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
1d8f4fe4
Commit
1d8f4fe4
authored
Feb 07, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Add an option to set the input codepage to UTF-8.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20459500
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
+16
-6
makedep.c
tools/makedep.c
+4
-4
parser.l
tools/wrc/parser.l
+1
-1
wrc.c
tools/wrc/wrc.c
+7
-1
wrc.h
tools/wrc/wrc.h
+1
-0
wrc.man.in
tools/wrc/wrc.man.in
+3
-0
No files found.
tools/makedep.c
View file @
1d8f4fe4
...
@@ -2710,7 +2710,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
...
@@ -2710,7 +2710,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
if
(
source
->
file
->
flags
&
FLAG_GENERATED
)
strarray_add
(
&
make
->
clean_files
,
source
->
name
);
if
(
source
->
file
->
flags
&
FLAG_GENERATED
)
strarray_add
(
&
make
->
clean_files
,
source
->
name
);
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
output
(
"%s.res: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
source
->
filename
);
output
(
"%s.res: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
source
->
filename
);
output
(
"
\t
%s -o $@"
,
tools_path
(
make
,
"wrc"
)
);
output
(
"
\t
%s -
u -
o $@"
,
tools_path
(
make
,
"wrc"
)
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
else
output_filenames
(
target_flags
);
else
output_filenames
(
target_flags
);
output_filename
(
"--nostdinc"
);
output_filename
(
"--nostdinc"
);
...
@@ -2735,7 +2735,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
...
@@ -2735,7 +2735,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
{
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"%s.pot"
,
obj
));
strarray_add
(
&
make
->
clean_files
,
strmake
(
"%s.pot"
,
obj
));
output
(
"%s.pot: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
source
->
filename
);
output
(
"%s.pot: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
source
->
filename
);
output
(
"
\t
%s -O pot -o $@"
,
tools_path
(
make
,
"wrc"
)
);
output
(
"
\t
%s -
u -
O pot -o $@"
,
tools_path
(
make
,
"wrc"
)
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
else
output_filenames
(
target_flags
);
else
output_filenames
(
target_flags
);
output_filename
(
"--nostdinc"
);
output_filename
(
"--nostdinc"
);
...
@@ -3019,7 +3019,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source,
...
@@ -3019,7 +3019,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source,
strarray_add
(
&
make
->
clean_files
,
dll_name
);
strarray_add
(
&
make
->
clean_files
,
dll_name
);
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
output
(
"%s.res: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
obj_dir_path
(
make
,
dll_name
));
output
(
"%s.res: %s
\n
"
,
obj_dir_path
(
make
,
obj
),
obj_dir_path
(
make
,
dll_name
));
output
(
"
\t
echo
\"
%s.dll TESTDLL
\\\"
%s
\\\"\"
| %s -o $@
\n
"
,
obj
,
output
(
"
\t
echo
\"
%s.dll TESTDLL
\\\"
%s
\\\"\"
| %s -
u -
o $@
\n
"
,
obj
,
obj_dir_path
(
make
,
dll_name
),
tools_path
(
make
,
"wrc"
));
obj_dir_path
(
make
,
dll_name
),
tools_path
(
make
,
"wrc"
));
output
(
"%s:"
,
obj_dir_path
(
make
,
dll_name
));
output
(
"%s:"
,
obj_dir_path
(
make
,
dll_name
));
...
@@ -3492,7 +3492,7 @@ static void output_test_module( struct makefile *make )
...
@@ -3492,7 +3492,7 @@ static void output_test_module( struct makefile *make )
output
(
"all: %s/%s
\n
"
,
top_obj_dir_path
(
make
,
"programs/winetest"
),
testres
);
output
(
"all: %s/%s
\n
"
,
top_obj_dir_path
(
make
,
"programs/winetest"
),
testres
);
output
(
"%s/%s: %s%s
\n
"
,
top_obj_dir_path
(
make
,
"programs/winetest"
),
testres
,
output
(
"%s/%s: %s%s
\n
"
,
top_obj_dir_path
(
make
,
"programs/winetest"
),
testres
,
obj_dir_path
(
make
,
stripped
),
ext
);
obj_dir_path
(
make
,
stripped
),
ext
);
output
(
"
\t
echo
\"
%s TESTRES
\\\"
%s%s
\\\"\"
| %s -o $@
\n
"
,
output
(
"
\t
echo
\"
%s TESTRES
\\\"
%s%s
\\\"\"
| %s -
u -
o $@
\n
"
,
testmodule
,
obj_dir_path
(
make
,
stripped
),
ext
,
tools_path
(
make
,
"wrc"
));
testmodule
,
obj_dir_path
(
make
,
stripped
),
ext
,
tools_path
(
make
,
"wrc"
));
output_filenames_obj_dir
(
make
,
make
->
ok_files
);
output_filenames_obj_dir
(
make
,
make
->
ok_files
);
...
...
tools/wrc/parser.l
View file @
1d8f4fe4
...
@@ -121,7 +121,7 @@ ws [ \f\t\r]
...
@@ -121,7 +121,7 @@ ws [ \f\t\r]
/* Always update the current character position within a line */
/* Always update the current character position within a line */
#define YY_USER_ACTION char_number+=yyleng; wanted_id = want_id; want_id = 0;
#define YY_USER_ACTION char_number+=yyleng; wanted_id = want_id; want_id = 0;
#define YY_USER_INIT current_codepage = -1;
#define YY_USER_INIT current_codepage =
utf8_input ? CP_UTF8 :
-1;
static void addcchar(char c);
static void addcchar(char c);
static void addwchar(WCHAR s);
static void addwchar(WCHAR s);
...
...
tools/wrc/wrc.c
View file @
1d8f4fe4
...
@@ -144,6 +144,8 @@ int preprocess_only = 0;
...
@@ -144,6 +144,8 @@ int preprocess_only = 0;
*/
*/
int
no_preprocess
=
0
;
int
no_preprocess
=
0
;
int
utf8_input
=
0
;
int
check_utf8
=
1
;
/* whether to check for valid utf8 */
int
check_utf8
=
1
;
/* whether to check for valid utf8 */
static
int
pointer_size
=
sizeof
(
void
*
);
static
int
pointer_size
=
sizeof
(
void
*
);
...
@@ -184,7 +186,7 @@ enum long_options_values
...
@@ -184,7 +186,7 @@ enum long_options_values
};
};
static
const
char
short_options
[]
=
static
const
char
short_options
[]
=
"b:D:Ef:F:hi:I:J:l:m:o:O:rU:v"
;
"b:D:Ef:F:hi:I:J:l:m:o:O:r
u
U:v"
;
static
const
struct
option
long_options
[]
=
{
static
const
struct
option
long_options
[]
=
{
{
"debug"
,
1
,
NULL
,
LONG_OPT_DEBUG
},
{
"debug"
,
1
,
NULL
,
LONG_OPT_DEBUG
},
{
"define"
,
1
,
NULL
,
'D'
},
{
"define"
,
1
,
NULL
,
'D'
},
...
@@ -203,6 +205,7 @@ static const struct option long_options[] = {
...
@@ -203,6 +205,7 @@ static const struct option long_options[] = {
{
"preprocessor"
,
1
,
NULL
,
LONG_OPT_PREPROCESSOR
},
{
"preprocessor"
,
1
,
NULL
,
LONG_OPT_PREPROCESSOR
},
{
"sysroot"
,
1
,
NULL
,
LONG_OPT_SYSROOT
},
{
"sysroot"
,
1
,
NULL
,
LONG_OPT_SYSROOT
},
{
"target"
,
1
,
NULL
,
'F'
},
{
"target"
,
1
,
NULL
,
'F'
},
{
"utf8"
,
0
,
NULL
,
'u'
},
{
"undefine"
,
1
,
NULL
,
'U'
},
{
"undefine"
,
1
,
NULL
,
'U'
},
{
"use-temp-file"
,
0
,
NULL
,
LONG_OPT_TMPFILE
},
{
"use-temp-file"
,
0
,
NULL
,
LONG_OPT_TMPFILE
},
{
"verbose"
,
0
,
NULL
,
'v'
},
{
"verbose"
,
0
,
NULL
,
'v'
},
...
@@ -503,6 +506,9 @@ int main(int argc,char *argv[])
...
@@ -503,6 +506,9 @@ int main(int argc,char *argv[])
case
'r'
:
case
'r'
:
/* ignored for compatibility with rc */
/* ignored for compatibility with rc */
break
;
break
;
case
'u'
:
utf8_input
=
1
;
break
;
case
'U'
:
case
'U'
:
wpp_del_define
(
optarg
);
wpp_del_define
(
optarg
);
break
;
break
;
...
...
tools/wrc/wrc.h
View file @
1d8f4fe4
...
@@ -39,6 +39,7 @@ extern int pedantic;
...
@@ -39,6 +39,7 @@ extern int pedantic;
extern
int
byteorder
;
extern
int
byteorder
;
extern
int
preprocess_only
;
extern
int
preprocess_only
;
extern
int
no_preprocess
;
extern
int
no_preprocess
;
extern
int
utf8_input
;
extern
int
check_utf8
;
extern
int
check_utf8
;
extern
char
*
input_name
;
extern
char
*
input_name
;
...
...
tools/wrc/wrc.man.in
View file @
1d8f4fe4
...
@@ -124,6 +124,9 @@ To disable preprocessing, use \fB--preprocessor=cat\fR.
...
@@ -124,6 +124,9 @@ To disable preprocessing, use \fB--preprocessor=cat\fR.
.I \fB\-\-sysroot=\fIdir\fR
.I \fB\-\-sysroot=\fIdir\fR
Prefix the standard include paths with \fIdir\fR.
Prefix the standard include paths with \fIdir\fR.
.TP
.TP
.I \fB\-\-utf8\fR, \fB\-u\fR
Set the default codepage of the input file to UTF-8.
.TP
.I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
.I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
Undefine preprocessor identifier \fIid\fR. Please note that only macros
Undefine preprocessor identifier \fIid\fR. Please note that only macros
defined up to this point are undefined by this command. However, these
defined up to this point are undefined by this command. However, these
...
...
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