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
Hide 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
if
(
source
->
file
->
flags
&
FLAG_GENERATED
)
strarray_add
(
&
make
->
clean_files
,
source
->
name
);
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
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"
);
else
output_filenames
(
target_flags
);
output_filename
(
"--nostdinc"
);
...
...
@@ -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
));
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"
);
else
output_filenames
(
target_flags
);
output_filename
(
"--nostdinc"
);
...
...
@@ -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
->
res_files
,
strmake
(
"%s.res"
,
obj
));
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"
));
output
(
"%s:"
,
obj_dir_path
(
make
,
dll_name
));
...
...
@@ -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
(
"%s/%s: %s%s
\n
"
,
top_obj_dir_path
(
make
,
"programs/winetest"
),
testres
,
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"
));
output_filenames_obj_dir
(
make
,
make
->
ok_files
);
...
...
tools/wrc/parser.l
View file @
1d8f4fe4
...
...
@@ -121,7 +121,7 @@ ws [ \f\t\r]
/* 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_INIT current_codepage = -1;
#define YY_USER_INIT current_codepage =
utf8_input ? CP_UTF8 :
-1;
static void addcchar(char c);
static void addwchar(WCHAR s);
...
...
tools/wrc/wrc.c
View file @
1d8f4fe4
...
...
@@ -144,6 +144,8 @@ int preprocess_only = 0;
*/
int
no_preprocess
=
0
;
int
utf8_input
=
0
;
int
check_utf8
=
1
;
/* whether to check for valid utf8 */
static
int
pointer_size
=
sizeof
(
void
*
);
...
...
@@ -184,7 +186,7 @@ enum long_options_values
};
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
[]
=
{
{
"debug"
,
1
,
NULL
,
LONG_OPT_DEBUG
},
{
"define"
,
1
,
NULL
,
'D'
},
...
...
@@ -203,6 +205,7 @@ static const struct option long_options[] = {
{
"preprocessor"
,
1
,
NULL
,
LONG_OPT_PREPROCESSOR
},
{
"sysroot"
,
1
,
NULL
,
LONG_OPT_SYSROOT
},
{
"target"
,
1
,
NULL
,
'F'
},
{
"utf8"
,
0
,
NULL
,
'u'
},
{
"undefine"
,
1
,
NULL
,
'U'
},
{
"use-temp-file"
,
0
,
NULL
,
LONG_OPT_TMPFILE
},
{
"verbose"
,
0
,
NULL
,
'v'
},
...
...
@@ -503,6 +506,9 @@ int main(int argc,char *argv[])
case
'r'
:
/* ignored for compatibility with rc */
break
;
case
'u'
:
utf8_input
=
1
;
break
;
case
'U'
:
wpp_del_define
(
optarg
);
break
;
...
...
tools/wrc/wrc.h
View file @
1d8f4fe4
...
...
@@ -39,6 +39,7 @@ extern int pedantic;
extern
int
byteorder
;
extern
int
preprocess_only
;
extern
int
no_preprocess
;
extern
int
utf8_input
;
extern
int
check_utf8
;
extern
char
*
input_name
;
...
...
tools/wrc/wrc.man.in
View file @
1d8f4fe4
...
...
@@ -124,6 +124,9 @@ To disable preprocessing, use \fB--preprocessor=cat\fR.
.I \fB\-\-sysroot=\fIdir\fR
Prefix the standard include paths with \fIdir\fR.
.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
Undefine preprocessor identifier \fIid\fR. Please note that only macros
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