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
4f0bb2e4
Commit
4f0bb2e4
authored
Nov 12, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Support only single directories with the -I option.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
747905c6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
48 deletions
+22
-48
widl.c
tools/widl/widl.c
+1
-1
widl.man.in
tools/widl/widl.man.in
+1
-1
wpp.c
tools/wrc/wpp.c
+16
-41
wrc.c
tools/wrc/wrc.c
+1
-1
wrc.man.in
tools/wrc/wrc.man.in
+3
-4
No files found.
tools/widl/widl.c
View file @
4f0bb2e4
...
...
@@ -54,7 +54,7 @@ static const char usage[] =
" --help Display this help and exit
\n
"
" -h Generate headers
\n
"
" -H file Name of header file (default is infile.h)
\n
"
" -I
path Set include search dir to
path (multiple -I allowed)
\n
"
" -I
directory Add directory to the include search
path (multiple -I allowed)
\n
"
" --local-stubs=file Write empty stubs for call_as/local methods to file
\n
"
" -m32, -m64 Set the target architecture (Win32 or Win64)
\n
"
" -N Do not preprocess input
\n
"
...
...
tools/widl/widl.man.in
View file @
4f0bb2e4
...
...
@@ -102,7 +102,7 @@ names. The default output filename is \fBdlldata.c\fR.
.PP
.B Preprocessor options:
.IP "\fB-I \fIpath\fR"
Add a
header search directory to path. Multiple search
Add a
directory to the include search path. Multiple include
directories are allowed.
.IP "\fB-D \fIid\fR[\fB=\fIval\fR]"
Define preprocessor macro \fIid\fR with value \fIval\fR.
...
...
tools/wrc/wpp.c
View file @
4f0bb2e4
...
...
@@ -54,9 +54,9 @@ struct define
};
static
struct
list
cmdline_defines
=
LIST_INIT
(
cmdline_defines
);
static
struct
strarray
includes
;
static
char
*
wpp_lookup
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
,
char
**
include_path
,
int
include_path_count
)
static
char
*
wpp_lookup
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
)
{
char
*
cpy
;
char
*
cptr
;
...
...
@@ -96,9 +96,9 @@ static char *wpp_lookup(const char *name, int type, const char *parent_name,
free
(
path
);
}
/* Search -I path */
for
(
i
=
0
;
i
<
include
_path_
count
;
i
++
)
for
(
i
=
0
;
i
<
include
s
.
count
;
i
++
)
{
path
=
strmake
(
"%s/%s"
,
include
_path
[
i
],
cpy
);
path
=
strmake
(
"%s/%s"
,
include
s
.
str
[
i
],
cpy
);
fd
=
open
(
path
,
O_RDONLY
);
if
(
fd
!=
-
1
)
{
...
...
@@ -294,51 +294,26 @@ pp_entry_t *pp_add_macro(char *id, char *args[], int nargs, mtext_t *exp)
* Include management
*-------------------------------------------------------------------------
*/
#if defined(_WIN32) || defined(__MSDOS__)
#define INCLUDESEPARATOR ";"
#else
#define INCLUDESEPARATOR ":"
#endif
static
char
**
includepath
;
static
int
nincludepath
=
0
;
void
wpp_add_include_path
(
const
char
*
path
)
{
char
*
tok
;
char
*
cp
y
=
xstrdup
(
path
)
;
char
*
dir
=
xstrdup
(
path
)
;
char
*
cp
tr
;
tok
=
strtok
(
cpy
,
INCLUDESEPARATOR
);
while
(
tok
)
for
(
cptr
=
dir
;
*
cptr
;
cptr
++
)
{
if
(
*
tok
)
{
char
*
dir
;
char
*
cptr
;
dir
=
xstrdup
(
tok
);
for
(
cptr
=
dir
;
*
cptr
;
cptr
++
)
{
/* Convert to forward slash */
if
(
*
cptr
==
'\\'
)
*
cptr
=
'/'
;
}
/* Kill eventual trailing '/' */
if
(
*
(
cptr
=
dir
+
strlen
(
dir
)
-
1
)
==
'/'
)
*
cptr
=
'\0'
;
/* Add to list */
includepath
=
xrealloc
(
includepath
,
(
nincludepath
+
1
)
*
sizeof
(
*
includepath
));
includepath
[
nincludepath
]
=
dir
;
nincludepath
++
;
}
tok
=
strtok
(
NULL
,
INCLUDESEPARATOR
);
/* Convert to forward slash */
if
(
*
cptr
==
'\\'
)
*
cptr
=
'/'
;
}
free
(
cpy
);
/* Kill eventual trailing '/' */
if
(
*
(
cptr
=
dir
+
strlen
(
dir
)
-
1
)
==
'/'
)
*
cptr
=
'\0'
;
strarray_add
(
&
includes
,
dir
);
}
char
*
wpp_find_include
(
const
char
*
name
,
const
char
*
parent_name
)
{
return
wpp_lookup
(
name
,
!!
parent_name
,
parent_name
,
includepath
,
nincludepath
);
return
wpp_lookup
(
name
,
!!
parent_name
,
parent_name
);
}
void
*
pp_open_include
(
const
char
*
name
,
int
type
,
const
char
*
parent_name
,
char
**
newpath
)
...
...
@@ -346,7 +321,7 @@ void *pp_open_include(const char *name, int type, const char *parent_name, char
char
*
path
;
void
*
fp
;
if
(
!
(
path
=
wpp_lookup
(
name
,
type
,
parent_name
,
includepath
,
nincludepath
)))
return
NULL
;
if
(
!
(
path
=
wpp_lookup
(
name
,
type
,
parent_name
)))
return
NULL
;
fp
=
fopen
(
path
,
"rt"
);
if
(
fp
)
...
...
tools/wrc/wrc.c
View file @
4f0bb2e4
...
...
@@ -51,7 +51,7 @@ static const char usage[] =
" -fo FILE Synonym for -o for compatibility with windres
\n
"
" -h, --help Prints this summary
\n
"
" -i, --input=FILE The name of the input file
\n
"
" -I, --include-dir=
PATH Set include search dir to
path (multiple -I allowed)
\n
"
" -I, --include-dir=
DIR Add dir to the include search
path (multiple -I allowed)
\n
"
" -J, --input-format=FORMAT The input format (either `rc' or `rc16')
\n
"
" -l, --language=LANG Set default language to LANG (default is neutral {0, 0})
\n
"
" -m16 Build a 16-bit resource file
\n
"
...
...
tools/wrc/wrc.man.in
View file @
4f0bb2e4
...
...
@@ -46,10 +46,9 @@ will use the first non-option argument as the input file name. If there
are no non-option arguments, then \fBwrc\fR will read from standard input.
.TP
.I \fB\-I\fR, \fB\-\-include\-dir\fR=\fIpath\fR
Add \fIpath\fR to include search directories. \fIpath\fR may contain
multiple directories, separated with ':'. It is allowed to specify
\fB\-I\fR multiple times. Include files are searched in the order in
which the \fB\-I\fR options were specified.
Add \fIpath\fR to the list of directories to search for includes. It
is allowed to specify \fB\-I\fR multiple times. Include files are
searched in the order in which the \fB\-I\fR options were specified.
.br
The search is compatible with gcc, in which '<>' quoted filenames are
searched exclusively via the \fB\-I\fR set path, whereas the '""' quoted
...
...
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