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
8555820a
Commit
8555820a
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a label, to better match its task
parent
e7bdfebd
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 @
8555820a
...
...
@@ -388,7 +388,7 @@ void parse_binding(char *ptr, bool dobind)
if
(
strlen
(
keycopy
)
<
2
)
{
rcfile_error
(
N_
(
"Key name is too short"
));
goto
free_
copy
;
goto
free_
things
;
}
/* Uppercase only the first two or three characters of the key name. */
...
...
@@ -399,7 +399,7 @@ void parse_binding(char *ptr, bool dobind)
keycopy
[
2
]
=
toupper
((
unsigned
char
)
keycopy
[
2
]);
else
{
rcfile_error
(
N_
(
"Key name is too short"
));
goto
free_
copy
;
goto
free_
things
;
}
}
...
...
@@ -409,10 +409,10 @@ void parse_binding(char *ptr, bool dobind)
keycopy
[
1
]
=
tolower
((
unsigned
char
)
keycopy
[
1
]);
else
if
(
keycopy
[
0
]
!=
'^'
&&
keycopy
[
0
]
!=
'M'
&&
keycopy
[
0
]
!=
'F'
)
{
rcfile_error
(
N_
(
"Key name must begin with
\"
^
\"
,
\"
M
\"
, or
\"
F
\"
"
));
goto
free_
copy
;
goto
free_
things
;
}
else
if
(
keycode_from_string
(
keycopy
)
<
0
)
{
rcfile_error
(
N_
(
"Key name %s is invalid"
),
keycopy
);
goto
free_
copy
;
goto
free_
things
;
}
if
(
dobind
)
{
...
...
@@ -421,7 +421,7 @@ void parse_binding(char *ptr, bool dobind)
if
(
funcptr
[
0
]
==
'\0'
)
{
rcfile_error
(
N_
(
"Must specify a function to bind the key to"
));
goto
free_
copy
;
goto
free_
things
;
}
}
...
...
@@ -431,21 +431,21 @@ void parse_binding(char *ptr, bool dobind)
if
(
menuptr
[
0
]
==
'\0'
)
{
/* TRANSLATORS: Do not translate the word "all". */
rcfile_error
(
N_
(
"Must specify a menu (or
\"
all
\"
) in which to bind/unbind the key"
));
goto
free_
copy
;
goto
free_
things
;
}
if
(
dobind
)
{
newsc
=
strtosc
(
funcptr
);
if
(
newsc
==
NULL
)
{
rcfile_error
(
N_
(
"Cannot map name
\"
%s
\"
to a function"
),
funcptr
);
goto
free_
copy
;
goto
free_
things
;
}
}
menu
=
strtomenu
(
menuptr
);
if
(
menu
<
1
)
{
rcfile_error
(
N_
(
"Cannot map name
\"
%s
\"
to a menu"
),
menuptr
);
goto
free_
copy
;
goto
free_
things
;
}
#ifdef DEBUG
...
...
@@ -479,7 +479,7 @@ void parse_binding(char *ptr, bool dobind)
if
(
!
menu
)
{
rcfile_error
(
N_
(
"Function '%s' does not exist in menu '%s'"
),
funcptr
,
menuptr
);
goto
free_
copy
;
goto
free_
things
;
}
newsc
->
menus
=
menu
;
...
...
@@ -488,7 +488,7 @@ void parse_binding(char *ptr, bool dobind)
/* Do not allow rebinding a frequent escape-sequence starter: Esc [. */
if
(
newsc
->
meta
&&
newsc
->
keycode
==
91
)
{
rcfile_error
(
N_
(
"Sorry, keystroke
\"
%s
\"
may not be rebound"
),
newsc
->
keystr
);
goto
free_
copy
;
goto
free_
things
;
}
#ifdef DEBUG
fprintf
(
stderr
,
"s->keystr =
\"
%s
\"\n
"
,
newsc
->
keystr
);
...
...
@@ -522,7 +522,7 @@ void parse_binding(char *ptr, bool dobind)
return
;
}
free_
copy
:
free_
things
:
free
(
newsc
);
free
(
keycopy
);
}
...
...
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