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
80034de2
Commit
80034de2
authored
Jun 13, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Jun 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wpp: Explicitly pass include type to the lookup callback function.
Also, always pass the parent name to the callback, d3dcompiler needs that information.
parent
8b0d3d9f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
compiler.c
dlls/d3dcompiler_43/compiler.c
+1
-1
wpp.h
include/wine/wpp.h
+4
-4
ppl.l
libs/wpp/ppl.l
+1
-1
preproc.c
libs/wpp/preproc.c
+6
-6
wpp_private.h
libs/wpp/wpp_private.h
+1
-1
No files found.
dlls/d3dcompiler_43/compiler.c
View file @
80034de2
...
...
@@ -143,7 +143,7 @@ static void wpp_warning(const char *file, int line, int col, const char *near,
wpp_write_message_var
(
"
\n
"
);
}
static
char
*
wpp_lookup_mem
(
const
char
*
filename
,
const
char
*
parent_name
,
static
char
*
wpp_lookup_mem
(
const
char
*
filename
,
int
type
,
const
char
*
parent_name
,
char
**
include_path
,
int
include_path_count
)
{
/* Here we return always ok. We will maybe fail on the next wpp_open_mem */
...
...
include/wine/wpp.h
View file @
80034de2
...
...
@@ -29,12 +29,12 @@ struct wpp_callbacks
/* I/O callbacks */
/* Looks for a file to include, returning the path where it is found */
/* parent_name is the directory of the parent source file (for local
* includes), includepath is an array of additional include paths */
char
*
(
*
lookup
)(
const
char
*
filename
,
const
char
*
parent_name
,
/* The type param is true for local (#include "filename.h") includes */
/* parent_name is the directory of the parent source file, includepath
* is an array of additional include paths */
char
*
(
*
lookup
)(
const
char
*
filename
,
int
type
,
const
char
*
parent_name
,
char
**
include_path
,
int
include_path_count
);
/* Opens an include file */
/* The type param is true if it is a local ("...") include */
void
*
(
*
open
)(
const
char
*
filename
,
int
type
);
/* Closes a previously opened file */
void
(
*
close
)(
void
*
file
);
...
...
libs/wpp/ppl.l
View file @
80034de2
...
...
@@ -1601,7 +1601,7 @@ void pp_do_include(char *fname, int type)
/* Undo the effect of the quotation */
fname[n-1] = '\0';
if((fp = pp_open_include(fname+1, type
? pp_status.input : NULL
, &newpath)) == NULL)
if((fp = pp_open_include(fname+1, type
, pp_status.input
, &newpath)) == NULL)
{
ppy_error("Unable to open include file %s", fname+1);
return;
...
...
libs/wpp/preproc.c
View file @
80034de2
...
...
@@ -115,7 +115,7 @@ char *pp_xstrdup(const char *str)
return
memcpy
(
s
,
str
,
len
);
}
static
char
*
wpp_default_lookup
(
const
char
*
name
,
const
char
*
parent_name
,
static
char
*
wpp_default_lookup
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
,
char
**
include_path
,
int
include_path_count
)
{
char
*
cpy
;
...
...
@@ -144,7 +144,7 @@ static char *wpp_default_lookup(const char *name, const char *parent_name,
}
*
cptr
=
'\0'
;
if
(
parent_name
)
if
(
type
&&
parent_name
)
{
/* Search directory of parent include and then -I path */
const
char
*
p
;
...
...
@@ -507,17 +507,17 @@ int wpp_add_include_path(const char *path)
char
*
wpp_find_include
(
const
char
*
name
,
const
char
*
parent_name
)
{
return
wpp_default_lookup
(
name
,
parent_name
,
includepath
,
nincludepath
);
return
wpp_default_lookup
(
name
,
!!
parent_name
,
parent_name
,
includepath
,
nincludepath
);
}
void
*
pp_open_include
(
const
char
*
name
,
const
char
*
parent_name
,
char
**
newpath
)
void
*
pp_open_include
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
,
char
**
newpath
)
{
char
*
path
;
void
*
fp
;
if
(
!
(
path
=
wpp_callbacks
->
lookup
(
name
,
parent_name
,
includepath
,
if
(
!
(
path
=
wpp_callbacks
->
lookup
(
name
,
type
,
parent_name
,
includepath
,
nincludepath
)))
return
NULL
;
fp
=
wpp_callbacks
->
open
(
path
,
!!
parent_nam
e
);
fp
=
wpp_callbacks
->
open
(
path
,
typ
e
);
if
(
fp
)
{
...
...
libs/wpp/wpp_private.h
View file @
80034de2
...
...
@@ -207,7 +207,7 @@ void pp_pop_define_state(void);
pp_entry_t
*
pp_add_define
(
const
char
*
def
,
const
char
*
text
);
pp_entry_t
*
pp_add_macro
(
char
*
ident
,
marg_t
*
args
[],
int
nargs
,
mtext_t
*
exp
);
void
pp_del_define
(
const
char
*
name
);
void
*
pp_open_include
(
const
char
*
name
,
const
char
*
parent_name
,
char
**
newpath
);
void
*
pp_open_include
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
,
char
**
newpath
);
void
pp_push_if
(
pp_if_state_t
s
);
void
pp_next_if_state
(
int
);
pp_if_state_t
pp_pop_if
(
void
);
...
...
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