Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
61f956f5
Commit
61f956f5
authored
May 04, 2011
by
Arnaud Lacombe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kconfig: constify `kconf_id_lookup'
Signed-off-by:
Arnaud Lacombe
<
lacombar@gmail.com
>
parent
58ef81c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
scripts/kconfig/Makefile
scripts/kconfig/Makefile
+1
-1
scripts/kconfig/zconf.gperf
scripts/kconfig/zconf.gperf
+1
-1
scripts/kconfig/zconf.l
scripts/kconfig/zconf.l
+2
-2
scripts/kconfig/zconf.y
scripts/kconfig/zconf.y
+4
-4
No files found.
scripts/kconfig/Makefile
View file @
61f956f5
...
...
@@ -356,7 +356,7 @@ lex.%.c: %.l
cp
$@
$@
_shipped
%.hash.c
:
%.gperf
gperf <
$<
>
$@
gperf
-C
<
$<
>
$@
cp
$@
$@
_shipped
endif
scripts/kconfig/zconf.gperf
View file @
61f956f5
...
...
@@ -9,7 +9,7 @@
struct kconf_id;
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
static
const
struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
%%
mainmenu, T_MAINMENU, TF_COMMAND
...
...
scripts/kconfig/zconf.l
View file @
61f956f5
...
...
@@ -96,7 +96,7 @@ n [A-Za-z0-9_]
<COMMAND>{
{n}+ {
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
const
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
BEGIN(PARAM);
current_pos.file = current_file;
current_pos.lineno = current_file->lineno;
...
...
@@ -132,7 +132,7 @@ n [A-Za-z0-9_]
\n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
--- /* ignore */
({n}|[-/.])+ {
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
const
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
return id->token;
...
...
scripts/kconfig/zconf.y
View file @
61f956f5
...
...
@@ -25,7 +25,7 @@ extern int zconflex(void);
static void zconfprint(const char *err, ...);
static void zconf_error(const char *err, ...);
static void zconferror(const char *err);
static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
static bool zconf_endtoken(
const
struct kconf_id *id, int starttoken, int endtoken);
struct symbol *symbol_hash[SYMBOL_HASHSIZE];
...
...
@@ -45,7 +45,7 @@ static struct menu *current_menu, *current_entry;
struct symbol *symbol;
struct expr *expr;
struct menu *menu;
struct kconf_id *id;
const
struct kconf_id *id;
}
%token <id>T_MAINMENU
...
...
@@ -229,7 +229,7 @@ symbol_option_list:
/* empty */
| symbol_option_list T_WORD symbol_option_arg
{
struct kconf_id *id = kconf_id_lookup($2, strlen($2));
const
struct kconf_id *id = kconf_id_lookup($2, strlen($2));
if (id && id->flags & TF_OPTION)
menu_add_option(id->token, $3);
else
...
...
@@ -545,7 +545,7 @@ static const char *zconf_tokenname(int token)
return "<token>";
}
static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
static bool zconf_endtoken(
const
struct kconf_id *id, int starttoken, int endtoken)
{
if (id->token != endtoken) {
zconf_error("unexpected '%s' within %s block",
...
...
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