Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3bf6315a
Commit
3bf6315a
authored
Aug 27, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Constify some variables.
parent
4438b3be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
parser.c
dlls/setupapi/parser.c
+8
-8
setupapi_private.h
dlls/setupapi/setupapi_private.h
+2
-2
No files found.
dlls/setupapi/parser.c
View file @
3bf6315a
...
...
@@ -175,7 +175,7 @@ static void *grow_array( void *array, unsigned int *count, size_t elem )
/* get the directory of the inf file (as counted string, not null-terminated) */
static
const
WCHAR
*
get_inf_dir
(
struct
inf_file
*
file
,
unsigned
int
*
len
)
static
const
WCHAR
*
get_inf_dir
(
const
struct
inf_file
*
file
,
unsigned
int
*
len
)
{
const
WCHAR
*
p
=
strrchrW
(
file
->
filename
,
'\\'
);
*
len
=
p
?
(
p
+
1
-
file
->
filename
)
:
0
;
...
...
@@ -184,7 +184,7 @@ static const WCHAR *get_inf_dir( struct inf_file *file, unsigned int *len )
/* find a section by name */
static
int
find_section
(
struct
inf_file
*
file
,
const
WCHAR
*
name
)
static
int
find_section
(
const
struct
inf_file
*
file
,
const
WCHAR
*
name
)
{
unsigned
int
i
;
...
...
@@ -303,7 +303,7 @@ static struct field *add_field( struct inf_file *file, const WCHAR *text )
/* retrieve the string substitution for a directory id */
static
const
WCHAR
*
get_dirid_subst
(
struct
inf_file
*
file
,
int
dirid
,
unsigned
int
*
len
)
static
const
WCHAR
*
get_dirid_subst
(
const
struct
inf_file
*
file
,
int
dirid
,
unsigned
int
*
len
)
{
const
WCHAR
*
ret
;
...
...
@@ -316,7 +316,7 @@ static const WCHAR *get_dirid_subst( struct inf_file *file, int dirid, unsigned
/* retrieve the string substitution for a given string, or NULL if not found */
/* if found, len is set to the substitution length */
static
const
WCHAR
*
get_string_subst
(
struct
inf_file
*
file
,
const
WCHAR
*
str
,
unsigned
int
*
len
,
static
const
WCHAR
*
get_string_subst
(
const
struct
inf_file
*
file
,
const
WCHAR
*
str
,
unsigned
int
*
len
,
BOOL
no_trailing_slash
)
{
static
const
WCHAR
percent
=
'%'
;
...
...
@@ -365,7 +365,7 @@ static const WCHAR *get_string_subst( struct inf_file *file, const WCHAR *str, u
/* do string substitutions on the specified text */
/* the buffer is assumed to be large enough */
/* returns necessary length not including terminating null */
unsigned
int
PARSER_string_substW
(
struct
inf_file
*
file
,
const
WCHAR
*
text
,
WCHAR
*
buffer
,
unsigned
int
PARSER_string_substW
(
const
struct
inf_file
*
file
,
const
WCHAR
*
text
,
WCHAR
*
buffer
,
unsigned
int
size
)
{
const
WCHAR
*
start
,
*
subst
,
*
p
;
...
...
@@ -418,7 +418,7 @@ unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text, WCH
/* do string substitutions on the specified text */
/* the buffer is assumed to be large enough */
/* returns necessary length not including terminating null */
unsigned
int
PARSER_string_substA
(
struct
inf_file
*
file
,
const
WCHAR
*
text
,
char
*
buffer
,
unsigned
int
PARSER_string_substA
(
const
struct
inf_file
*
file
,
const
WCHAR
*
text
,
char
*
buffer
,
unsigned
int
size
)
{
WCHAR
buffW
[
MAX_STRING_LEN
+
1
];
...
...
@@ -471,14 +471,14 @@ static inline enum parser_state set_state( struct parser *parser, enum parser_st
/* check if the pointer points to an end of file */
static
inline
int
is_eof
(
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
static
inline
int
is_eof
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
{
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
);
}
/* check if the pointer points to an end of line */
static
inline
int
is_eol
(
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
static
inline
int
is_eol
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
{
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
||
*
ptr
==
'\n'
);
}
...
...
dlls/setupapi/setupapi_private.h
View file @
3bf6315a
...
...
@@ -45,9 +45,9 @@ static inline WCHAR *strdupAtoW( const char *str )
struct
inf_file
;
extern
const
WCHAR
*
DIRID_get_string
(
int
dirid
);
extern
unsigned
int
PARSER_string_substA
(
struct
inf_file
*
file
,
const
WCHAR
*
text
,
extern
unsigned
int
PARSER_string_substA
(
const
struct
inf_file
*
file
,
const
WCHAR
*
text
,
char
*
buffer
,
unsigned
int
size
);
extern
unsigned
int
PARSER_string_substW
(
struct
inf_file
*
file
,
const
WCHAR
*
text
,
extern
unsigned
int
PARSER_string_substW
(
const
struct
inf_file
*
file
,
const
WCHAR
*
text
,
WCHAR
*
buffer
,
unsigned
int
size
);
extern
const
WCHAR
*
PARSER_get_inf_filename
(
HINF
hinf
);
extern
WCHAR
*
PARSER_get_src_root
(
HINF
hinf
);
...
...
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