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
4f0fa260
Commit
4f0fa260
authored
Sep 12, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmc: Change the prefix on bison-generated names to avoid the name-prefix directive.
parent
86bb809e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
26 deletions
+24
-26
mcl.c
tools/wmc/mcl.c
+9
-9
mcy.y
tools/wmc/mcy.y
+3
-5
utils.c
tools/wmc/utils.c
+4
-4
utils.h
tools/wmc/utils.h
+2
-2
wmc.c
tools/wmc/wmc.c
+3
-3
wmc.h
tools/wmc/wmc.h
+3
-3
No files found.
tools/wmc/mcl.c
View file @
4f0fa260
...
...
@@ -302,7 +302,7 @@ try_again:
if
(
!
n
)
{
yy
warning
(
"Re-read line (input was or converted to zilch)"
);
mcy_
warning
(
"Re-read line (input was or converted to zilch)"
);
goto
try_again
;
/* Should not happen, but could be due to stdin reading and a signal */
}
...
...
@@ -490,7 +490,7 @@ static int scan_number(int ch)
else
{
unget_unichar
(
ch
);
yy
lval
.
num
=
0
;
mcy_
lval
.
num
=
0
;
return
tNUMBER
;
}
break
;
...
...
@@ -535,7 +535,7 @@ static int scan_number(int ch)
finish:
unget_unichar
(
ch
);
push_char
(
0
);
yy
lval
.
num
=
strtoul
(
get_char_stack
(),
NULL
,
base
);
mcy_
lval
.
num
=
strtoul
(
get_char_stack
(),
NULL
,
base
);
return
tNUMBER
;
}
...
...
@@ -586,7 +586,7 @@ void get_tokentable(token_t **tab, int *len)
* The scanner
*
*/
int
yy
lex
(
void
)
int
mcy_
lex
(
void
)
{
static
const
WCHAR
ustr_dot1
[]
=
{
'.'
,
'\n'
,
0
};
static
const
WCHAR
ustr_dot2
[]
=
{
'.'
,
'\r'
,
'\n'
,
0
};
...
...
@@ -639,7 +639,7 @@ int yylex(void)
set_codepage
(
WMC_DEFAULT_CODEPAGE
);
return
tMSGEND
;
}
yy
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
mcy_
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
return
tLINE
;
}
...
...
@@ -677,7 +677,7 @@ int yylex(void)
unget_unichar
(
ch
);
push_unichar
(
0
);
want_file
=
0
;
yy
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
mcy_
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
return
tFILE
;
}
...
...
@@ -693,7 +693,7 @@ int yylex(void)
push_unichar
(
0
);
if
(
!
(
tok
=
lookup_token
(
get_unichar_stack
())))
{
yy
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
mcy_
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
return
tIDENT
;
}
switch
(
tok
->
type
)
...
...
@@ -706,7 +706,7 @@ int yylex(void)
/* Fall through */
case
tok_severity
:
case
tok_facility
:
yy
lval
.
tok
=
tok
;
mcy_
lval
.
tok
=
tok
;
return
tTOKEN
;
default:
...
...
@@ -738,7 +738,7 @@ int yylex(void)
newline
();
push_unichar
(
ch
);
/* Include the newline */
push_unichar
(
0
);
yy
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
mcy_
lval
.
str
=
xunistrdup
(
get_unichar_stack
());
return
tCOMMENT
;
default:
xyyerror
(
"Invalid character '%c' (0x%04x)"
,
isisochar
(
ch
)
&&
isprint
(
ch
)
?
ch
:
'.'
,
ch
);
...
...
tools/wmc/mcy.y
View file @
4f0fa260
...
...
@@ -95,8 +95,6 @@ static cp_xlat_t *find_cpxlat(int lan);
%}
%name-prefix="yy"
%union {
WCHAR *str;
unsigned num;
...
...
@@ -231,7 +229,7 @@ lmap : token '=' tNUMBER setfile ':' tFILE optcp {
$1->codepage = $7;
do_add_token(tok_language, $1, "language");
if(!find_language($3) && !find_cpxlat($3))
yy
warning("Language 0x%x not built-in, using codepage %d; use explicit codepage to override", $3, WMC_DEFAULT_CODEPAGE);
mcy_
warning("Language 0x%x not built-in, using codepage %d; use explicit codepage to override", $3, WMC_DEFAULT_CODEPAGE);
}
| token '=' tNUMBER setfile ':' error { xyyerror("Filename expected"); }
| token '=' tNUMBER error { xyyerror(err_colon); }
...
...
@@ -421,7 +419,7 @@ static void do_add_token(tok_e type, token_t *tok, const char *code)
if(tp)
{
if(tok->type != type)
yy
warning("Type change in token");
mcy_
warning("Type change in token");
if(tp != tok)
xyyerror("Overlapping token not the same");
/* else its already defined and changed */
...
...
@@ -444,7 +442,7 @@ static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg)
lmp->msg = msg;
lmp->len = unistrlen(msg) + 1; /* Include termination */
if(lmp->len > 4096)
yy
warning("Message exceptionally long; might be a missing termination");
mcy_
warning("Message exceptionally long; might be a missing termination");
return lmp;
}
...
...
tools/wmc/utils.c
View file @
4f0fa260
...
...
@@ -49,7 +49,7 @@ static void generic_msg(const char *s, const char *t, va_list ap)
* The extra routine 'xyyerror' is used to exit after giving a real
* message.
*/
int
yy
error
(
const
char
*
s
,
...)
int
mcy_
error
(
const
char
*
s
,
...)
{
#ifndef SUPPRESS_YACC_ERROR_MESSAGE
va_list
ap
;
...
...
@@ -70,7 +70,7 @@ int xyyerror(const char *s, ...)
return
1
;
}
int
yy
warning
(
const
char
*
s
,
...)
int
mcy_
warning
(
const
char
*
s
,
...)
{
va_list
ap
;
va_start
(
ap
,
s
);
...
...
@@ -215,7 +215,7 @@ int unistricmp(const WCHAR *s1, const WCHAR *s2)
if
(
!
once
)
{
once
++
;
yy
warning
(
warn
);
mcy_
warning
(
warn
);
}
i
=
*
s1
++
-
*
s2
++
;
}
...
...
@@ -228,7 +228,7 @@ int unistricmp(const WCHAR *s1, const WCHAR *s2)
if
((
*
s1
&
0xffff
)
>
0x7f
||
(
*
s2
&
0xffff
)
>
0x7f
)
{
if
(
!
once
)
yy
warning
(
warn
);
mcy_
warning
(
warn
);
return
*
s1
-
*
s2
;
}
else
...
...
tools/wmc/utils.h
View file @
4f0fa260
...
...
@@ -33,9 +33,9 @@ char *xstrdup(const char *str);
#define __attribute__(X)
#endif
int
yy
error
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
int
mcy_
error
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
int
xyyerror
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
int
yy
warning
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
int
mcy_
warning
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
void
internal_error
(
const
char
*
file
,
int
line
,
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
3
,
4
)));
void
error
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
void
warning
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
...
...
tools/wmc/wmc.c
View file @
4f0fa260
...
...
@@ -113,7 +113,7 @@ int char_number = 1; /* The current char pos within the line */
char
*
cmdline
;
/* The entire commandline */
time_t
now
;
/* The time of start of wmc */
int
yy
debug
;
int
mcy_
debug
;
int
getopt
(
int
argc
,
char
*
const
*
argv
,
const
char
*
optstring
);
static
void
segvhandler
(
int
sig
);
...
...
@@ -239,7 +239,7 @@ int main(int argc,char *argv[])
return
1
;
}
yy
debug
=
dodebug
;
mcy_
debug
=
dodebug
;
if
(
dodebug
)
{
setbuf
(
stdout
,
0
);
...
...
@@ -273,7 +273,7 @@ int main(int argc,char *argv[])
else
yyin
=
stdin
;
ret
=
yy
parse
();
ret
=
mcy_
parse
();
if
(
input_name
)
fclose
(
yyin
);
...
...
tools/wmc/wmc.h
View file @
4f0fa260
...
...
@@ -56,15 +56,15 @@ extern time_t now;
extern
int
line_number
;
extern
int
char_number
;
int
yy
parse
(
void
);
extern
int
yy
debug
;
int
mcy_
parse
(
void
);
extern
int
mcy_
debug
;
extern
int
want_nl
;
extern
int
want_line
;
extern
int
want_file
;
extern
node_t
*
nodehead
;
extern
lan_blk_t
*
lanblockhead
;
int
yy
lex
(
void
);
int
mcy_
lex
(
void
);
FILE
*
yyin
;
void
set_codepage
(
int
cp
);
...
...
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