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
4034ff36
Commit
4034ff36
authored
Oct 14, 2003
by
Daniel Marmier
Committed by
Alexandre Julliard
Oct 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed warnings with gcc option "-Wwrite-strings".
parent
9bd1dbd0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
93 deletions
+95
-93
sql.y
dlls/msi/sql.y
+2
-2
dumpres.c
tools/wrc/dumpres.c
+66
-66
dumpres.h
tools/wrc/dumpres.h
+3
-3
genres.c
tools/wrc/genres.c
+8
-7
genres.h
tools/wrc/genres.h
+3
-3
parser.l
tools/wrc/parser.l
+6
-6
parser.y
tools/wrc/parser.y
+3
-2
readres.c
tools/wrc/readres.c
+1
-1
utils.c
tools/wrc/utils.c
+2
-2
utils.h
tools/wrc/utils.h
+1
-1
No files found.
dlls/msi/sql.y
View file @
4034ff36
...
...
@@ -36,7 +36,7 @@
#define YYLEX_PARAM info
#define YYPARSE_PARAM info
extern int yyerror(char *str);
extern int yyerror(c
onst c
har *str);
WINE_DEFAULT_DEBUG_CHANNEL(msi);
...
...
@@ -392,7 +392,7 @@ INT yygetint( yyinput *sql )
return atoiW( p );
}
int yyerror(char *str)
int yyerror(c
onst c
har *str)
{
return 0;
}
...
...
tools/wrc/dumpres.c
View file @
4034ff36
...
...
@@ -36,7 +36,7 @@
* Remarks :
*****************************************************************************
*/
c
har
*
get_typename
(
resource_t
*
r
)
c
onst
char
*
get_typename
(
const
resource_t
*
r
)
{
switch
(
r
->
type
){
case
res_acc
:
return
"ACCELERATOR"
;
...
...
@@ -78,10 +78,10 @@ char *get_typename(resource_t* r)
* Remarks : No codepage translation is done.
*****************************************************************************
*/
char
*
strncpyWtoA
(
char
*
cs
,
short
*
ws
,
int
maxlen
)
char
*
strncpyWtoA
(
char
*
cs
,
const
short
*
ws
,
int
maxlen
)
{
char
*
cptr
=
cs
;
short
*
wsMax
=
ws
+
maxlen
-
1
;
const
short
*
wsMax
=
ws
+
maxlen
-
1
;
while
(
*
ws
&&
ws
<
wsMax
)
{
if
(
*
ws
<
-
128
||
*
ws
>
127
)
...
...
@@ -102,7 +102,7 @@ char *strncpyWtoA(char *cs, short *ws, int maxlen)
* Remarks :
*****************************************************************************
*/
void
print_string
(
string_t
*
str
)
void
print_string
(
const
string_t
*
str
)
{
char
buffer
[
512
];
if
(
!
str
)
...
...
@@ -119,7 +119,7 @@ void print_string(string_t *str)
/*
*****************************************************************************
* Function : get_nameid_str
* Syntax : c
har *get_nameid_str(
name_id_t *n)
* Syntax : c
onst char *get_nameid_str(const
name_id_t *n)
* Input :
* n - nameid to convert to text
* Output : A pointer to the name.
...
...
@@ -127,7 +127,7 @@ void print_string(string_t *str)
* Remarks : Not reentrant because of static buffer
*****************************************************************************
*/
c
har
*
get_nameid_str
(
name_id_t
*
n
)
c
onst
char
*
get_nameid_str
(
const
name_id_t
*
n
)
{
static
char
buffer
[
256
];
...
...
@@ -187,7 +187,7 @@ static void dump_memopt(DWORD memopt)
/*
*****************************************************************************
* Function : dump_lvc
* Syntax : void dump_lvc(lvc_t *l)
* Syntax : void dump_lvc(
const
lvc_t *l)
* Input :
* l - pointer to lvc structure
* Output :
...
...
@@ -195,7 +195,7 @@ static void dump_memopt(DWORD memopt)
* Remarks :
*****************************************************************************
*/
static
void
dump_lvc
(
lvc_t
*
l
)
static
void
dump_lvc
(
const
lvc_t
*
l
)
{
if
(
l
->
language
)
printf
(
"LANGUAGE %04x, %04x
\n
"
,
l
->
language
->
id
,
l
->
language
->
sub
);
...
...
@@ -216,7 +216,7 @@ static void dump_lvc(lvc_t *l)
/*
*****************************************************************************
* Function : dump_raw_data
* Syntax : void dump_raw_data(raw_data_t *d)
* Syntax : void dump_raw_data(
const
raw_data_t *d)
* Input :
* d - Raw data descriptor
* Output :
...
...
@@ -224,7 +224,7 @@ static void dump_lvc(lvc_t *l)
* Remarks :
*****************************************************************************
*/
static
void
dump_raw_data
(
raw_data_t
*
d
)
static
void
dump_raw_data
(
const
raw_data_t
*
d
)
{
unsigned
int
n
;
int
i
;
...
...
@@ -267,7 +267,7 @@ static void dump_raw_data(raw_data_t *d)
/*
*****************************************************************************
* Function : dump_accelerator
* Syntax : void dump_accelerator(
resource
_t *acc)
* Syntax : void dump_accelerator(
const accelerator
_t *acc)
* Input :
* acc - Accelerator resource descriptor
* Output : nop
...
...
@@ -275,7 +275,7 @@ static void dump_raw_data(raw_data_t *d)
* Remarks :
*****************************************************************************
*/
static
void
dump_accelerator
(
accelerator_t
*
acc
)
static
void
dump_accelerator
(
const
accelerator_t
*
acc
)
{
event_t
*
ev
=
acc
->
events
;
...
...
@@ -301,7 +301,7 @@ static void dump_accelerator(accelerator_t *acc)
/*
*****************************************************************************
* Function : dump_cursor
* Syntax : void dump_cursor(cursor_t *cur)
* Syntax : void dump_cursor(c
onst c
ursor_t *cur)
* Input :
* cur - Cursor resource descriptor
* Output : nop
...
...
@@ -309,7 +309,7 @@ static void dump_accelerator(accelerator_t *acc)
* Remarks :
*****************************************************************************
*/
static
void
dump_cursor
(
cursor_t
*
cur
)
static
void
dump_cursor
(
c
onst
c
ursor_t
*
cur
)
{
printf
(
"Id: %d
\n
"
,
cur
->
id
);
printf
(
"Width: %d
\n
"
,
cur
->
width
);
...
...
@@ -322,7 +322,7 @@ static void dump_cursor(cursor_t *cur)
/*
*****************************************************************************
* Function : dump_cursor_group
* Syntax : void dump_cursor_group(cursor_group_t *cur)
* Syntax : void dump_cursor_group(c
onst c
ursor_group_t *cur)
* Input :
* cur - Cursor group resource descriptor
* Output : nop
...
...
@@ -330,7 +330,7 @@ static void dump_cursor(cursor_t *cur)
* Remarks :
*****************************************************************************
*/
static
void
dump_cursor_group
(
cursor_group_t
*
curg
)
static
void
dump_cursor_group
(
c
onst
c
ursor_group_t
*
curg
)
{
dump_memopt
(
curg
->
memopt
);
printf
(
"There are %d cursors in this group
\n
"
,
curg
->
ncursor
);
...
...
@@ -339,7 +339,7 @@ static void dump_cursor_group(cursor_group_t *curg)
/*
*****************************************************************************
* Function : dump_icon
* Syntax : void dump_icon(icon_t *ico)
* Syntax : void dump_icon(
const
icon_t *ico)
* Input :
* ico - Icon resource descriptor
* Output : nop
...
...
@@ -347,7 +347,7 @@ static void dump_cursor_group(cursor_group_t *curg)
* Remarks :
*****************************************************************************
*/
static
void
dump_icon
(
icon_t
*
ico
)
static
void
dump_icon
(
const
icon_t
*
ico
)
{
printf
(
"Id: %d
\n
"
,
ico
->
id
);
printf
(
"Width: %d
\n
"
,
ico
->
width
);
...
...
@@ -361,7 +361,7 @@ static void dump_icon(icon_t *ico)
/*
*****************************************************************************
* Function : dump_icon_group
* Syntax : void dump_icon_group(icon_group_t *ico)
* Syntax : void dump_icon_group(
const
icon_group_t *ico)
* Input :
* ico - Icon group resource descriptor
* Output : nop
...
...
@@ -369,7 +369,7 @@ static void dump_icon(icon_t *ico)
* Remarks :
*****************************************************************************
*/
static
void
dump_icon_group
(
icon_group_t
*
icog
)
static
void
dump_icon_group
(
const
icon_group_t
*
icog
)
{
dump_memopt
(
icog
->
memopt
);
printf
(
"There are %d icons in this group
\n
"
,
icog
->
nicon
);
...
...
@@ -378,7 +378,7 @@ static void dump_icon_group(icon_group_t *icog)
/*
*****************************************************************************
* Function : dump_ani_curico
* Syntax : void dump_ani_curico(ani_curico_t *ani)
* Syntax : void dump_ani_curico(
const
ani_curico_t *ani)
* Input :
* ani - Animated object resource descriptor
* Output : nop
...
...
@@ -386,7 +386,7 @@ static void dump_icon_group(icon_group_t *icog)
* Remarks :
*****************************************************************************
*/
static
void
dump_ani_curico
(
ani_curico_t
*
ani
)
static
void
dump_ani_curico
(
const
ani_curico_t
*
ani
)
{
dump_memopt
(
ani
->
memopt
);
dump_lvc
(
&
ani
->
data
->
lvc
);
...
...
@@ -396,7 +396,7 @@ static void dump_ani_curico(ani_curico_t *ani)
/*
*****************************************************************************
* Function : dump_font
* Syntax : void dump_font(font_t *fnt)
* Syntax : void dump_font(
const
font_t *fnt)
* Input :
* fnt - Font resource descriptor
* Output : nop
...
...
@@ -404,7 +404,7 @@ static void dump_ani_curico(ani_curico_t *ani)
* Remarks :
*****************************************************************************
*/
static
void
dump_font
(
font_t
*
fnt
)
static
void
dump_font
(
const
font_t
*
fnt
)
{
dump_memopt
(
fnt
->
memopt
);
dump_lvc
(
&
(
fnt
->
data
->
lvc
));
...
...
@@ -414,7 +414,7 @@ static void dump_font(font_t *fnt)
/*
*****************************************************************************
* Function : dump_bitmap
* Syntax : void dump_bitmap(bitmap_t *bmp)
* Syntax : void dump_bitmap(
const
bitmap_t *bmp)
* Input :
* bmp - Bitmap resource descriptor
* Output : nop
...
...
@@ -422,7 +422,7 @@ static void dump_font(font_t *fnt)
* Remarks :
*****************************************************************************
*/
static
void
dump_bitmap
(
bitmap_t
*
bmp
)
static
void
dump_bitmap
(
const
bitmap_t
*
bmp
)
{
dump_memopt
(
bmp
->
memopt
);
dump_lvc
(
&
(
bmp
->
data
->
lvc
));
...
...
@@ -432,7 +432,7 @@ static void dump_bitmap(bitmap_t *bmp)
/*
*****************************************************************************
* Function : dump_rcdata
* Syntax : void dump_rcdata(rcdata_t *rdt)
* Syntax : void dump_rcdata(
const
rcdata_t *rdt)
* Input :
* rdt - RCData resource descriptor
* Output : nop
...
...
@@ -440,7 +440,7 @@ static void dump_bitmap(bitmap_t *bmp)
* Remarks :
*****************************************************************************
*/
static
void
dump_rcdata
(
rcdata_t
*
rdt
)
static
void
dump_rcdata
(
const
rcdata_t
*
rdt
)
{
dump_memopt
(
rdt
->
memopt
);
dump_lvc
(
&
(
rdt
->
data
->
lvc
));
...
...
@@ -450,7 +450,7 @@ static void dump_rcdata(rcdata_t *rdt)
/*
*****************************************************************************
* Function : dump_user
* Syntax : void dump_user(user_t *usr)
* Syntax : void dump_user(
const
user_t *usr)
* Input :
* usr - User resource descriptor
* Output : nop
...
...
@@ -458,7 +458,7 @@ static void dump_rcdata(rcdata_t *rdt)
* Remarks :
*****************************************************************************
*/
static
void
dump_user
(
user_t
*
usr
)
static
void
dump_user
(
const
user_t
*
usr
)
{
dump_memopt
(
usr
->
memopt
);
dump_lvc
(
&
(
usr
->
data
->
lvc
));
...
...
@@ -469,7 +469,7 @@ static void dump_user(user_t *usr)
/*
*****************************************************************************
* Function : dump_messagetable
* Syntax : void dump_messagetable(messagetable_t *msg)
* Syntax : void dump_messagetable(
const
messagetable_t *msg)
* Input :
* msg - Messagetable resource descriptor
* Output : nop
...
...
@@ -477,7 +477,7 @@ static void dump_user(user_t *usr)
* Remarks :
*****************************************************************************
*/
static
void
dump_messagetable
(
messagetable_t
*
msg
)
static
void
dump_messagetable
(
const
messagetable_t
*
msg
)
{
dump_memopt
(
msg
->
memopt
);
dump_lvc
(
&
(
msg
->
data
->
lvc
));
...
...
@@ -487,7 +487,7 @@ static void dump_messagetable(messagetable_t *msg)
/*
*****************************************************************************
* Function : dump_stringtable
* Syntax : void dump_stringtable(stringtable_t *stt)
* Syntax : void dump_stringtable(
const
stringtable_t *stt)
* Input :
* stt - Stringtable resource descriptor
* Output : nop
...
...
@@ -495,7 +495,7 @@ static void dump_messagetable(messagetable_t *msg)
* Remarks :
*****************************************************************************
*/
static
void
dump_stringtable
(
stringtable_t
*
stt
)
static
void
dump_stringtable
(
const
stringtable_t
*
stt
)
{
int
i
;
for
(;
stt
;
stt
=
stt
->
next
)
...
...
@@ -519,7 +519,7 @@ static void dump_stringtable(stringtable_t *stt)
/*
*****************************************************************************
* Function : dump_control
* Syntax : void dump_control(control_t *ctrl)
* Syntax : void dump_control(con
st con
trol_t *ctrl)
* Input :
* ctrl - Control resource descriptor
* Output :
...
...
@@ -527,7 +527,7 @@ static void dump_stringtable(stringtable_t *stt)
* Remarks :
*****************************************************************************
*/
static
void
dump_control
(
control_t
*
ctrl
)
static
void
dump_control
(
con
st
con
trol_t
*
ctrl
)
{
printf
(
"Control {
\n\t
Class: %s
\n
"
,
get_nameid_str
(
ctrl
->
ctlclass
));
printf
(
"
\t
Text: "
);
get_nameid_str
(
ctrl
->
title
);
printf
(
"
\n
"
);
...
...
@@ -558,7 +558,7 @@ static void dump_control(control_t *ctrl)
/*
*****************************************************************************
* Function : dump_dialog
* Syntax : void dump_dialog(dialog_t *dlg)
* Syntax : void dump_dialog(
const
dialog_t *dlg)
* Input :
* dlg - Dialog resource descriptor
* Output :
...
...
@@ -566,7 +566,7 @@ static void dump_control(control_t *ctrl)
* Remarks :
*****************************************************************************
*/
static
void
dump_dialog
(
dialog_t
*
dlg
)
static
void
dump_dialog
(
const
dialog_t
*
dlg
)
{
control_t
*
c
=
dlg
->
controls
;
...
...
@@ -608,7 +608,7 @@ static void dump_dialog(dialog_t *dlg)
/*
*****************************************************************************
* Function : dump_dialogex
* Syntax : void dump_dialogex(dialogex_t *dlgex)
* Syntax : void dump_dialogex(
const
dialogex_t *dlgex)
* Input :
* dlgex - DialogEx resource descriptor
* Output :
...
...
@@ -616,9 +616,9 @@ static void dump_dialog(dialog_t *dlg)
* Remarks :
*****************************************************************************
*/
static
void
dump_dialogex
(
dialogex_t
*
dlgex
)
static
void
dump_dialogex
(
const
dialogex_t
*
dlgex
)
{
control_t
*
c
=
dlgex
->
controls
;
con
st
con
trol_t
*
c
=
dlgex
->
controls
;
dump_memopt
(
dlgex
->
memopt
);
dump_lvc
(
&
(
dlgex
->
lvc
));
...
...
@@ -659,14 +659,14 @@ static void dump_dialogex(dialogex_t *dlgex)
/*
*****************************************************************************
* Function : dump_menu_item
* Syntax : void dump_menu_item(menu_item_t *item)
* Syntax : void dump_menu_item(
const
menu_item_t *item)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
static
void
dump_menu_item
(
menu_item_t
*
item
)
static
void
dump_menu_item
(
const
menu_item_t
*
item
)
{
while
(
item
)
{
...
...
@@ -696,7 +696,7 @@ static void dump_menu_item(menu_item_t *item)
/*
*****************************************************************************
* Function : dump_menu
* Syntax : void dump_menu(menu_t *men)
* Syntax : void dump_menu(
const
menu_t *men)
* Input :
* men - Menu resource descriptor
* Output :
...
...
@@ -704,7 +704,7 @@ static void dump_menu_item(menu_item_t *item)
* Remarks :
*****************************************************************************
*/
static
void
dump_menu
(
menu_t
*
men
)
static
void
dump_menu
(
const
menu_t
*
men
)
{
dump_memopt
(
men
->
memopt
);
dump_lvc
(
&
(
men
->
lvc
));
...
...
@@ -714,14 +714,14 @@ static void dump_menu(menu_t *men)
/*
*****************************************************************************
* Function : dump_menuex_item
* Syntax : void dump_menuex_item(menuex_item_t *item)
* Syntax : void dump_menuex_item(
const
menuex_item_t *item)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
static
void
dump_menuex_item
(
menuex_item_t
*
item
)
static
void
dump_menuex_item
(
const
menuex_item_t
*
item
)
{
while
(
item
)
{
...
...
@@ -766,7 +766,7 @@ static void dump_menuex_item(menuex_item_t *item)
/*
*****************************************************************************
* Function : dump_menuex
* Syntax : void dump_menuex(
dialog
ex_t *menex)
* Syntax : void dump_menuex(
const menu
ex_t *menex)
* Input :
* menex - MenuEx resource descriptor
* Output :
...
...
@@ -774,7 +774,7 @@ static void dump_menuex_item(menuex_item_t *item)
* Remarks :
*****************************************************************************
*/
static
void
dump_menuex
(
menuex_t
*
menex
)
static
void
dump_menuex
(
const
menuex_t
*
menex
)
{
dump_memopt
(
menex
->
memopt
);
dump_lvc
(
&
(
menex
->
lvc
));
...
...
@@ -784,16 +784,16 @@ static void dump_menuex(menuex_t *menex)
/*
*****************************************************************************
* Function : dump_ver_value
* Syntax : void dump_ver_value(ver_value_t *val)
* Syntax : void dump_ver_value(
const
ver_value_t *val)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
static
void
dump_ver_block
(
ver_block_t
*
);
/* Forward ref */
static
void
dump_ver_block
(
const
ver_block_t
*
);
/* Forward ref */
static
void
dump_ver_value
(
ver_value_t
*
val
)
static
void
dump_ver_value
(
const
ver_value_t
*
val
)
{
if
(
val
->
type
==
val_str
)
{
...
...
@@ -821,16 +821,16 @@ static void dump_ver_value(ver_value_t *val)
/*
*****************************************************************************
* Function : dump_ver_block
* Syntax : void dump_ver_block(ver_block_t *blk)
* Syntax : void dump_ver_block(
const
ver_block_t *blk)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
static
void
dump_ver_block
(
ver_block_t
*
blk
)
static
void
dump_ver_block
(
const
ver_block_t
*
blk
)
{
ver_value_t
*
val
=
blk
->
values
;
const
ver_value_t
*
val
=
blk
->
values
;
printf
(
"BLOCK "
);
print_string
(
blk
->
name
);
printf
(
"
\n
{
\n
"
);
...
...
@@ -845,7 +845,7 @@ static void dump_ver_block(ver_block_t *blk)
/*
*****************************************************************************
* Function : dump_versioninfo
* Syntax : void dump_versioninfo(versioninfo_t *ver)
* Syntax : void dump_versioninfo(
const
versioninfo_t *ver)
* Input :
* ver - Versioninfo resource descriptor
* Output :
...
...
@@ -853,9 +853,9 @@ static void dump_ver_block(ver_block_t *blk)
* Remarks :
*****************************************************************************
*/
static
void
dump_versioninfo
(
versioninfo_t
*
ver
)
static
void
dump_versioninfo
(
const
versioninfo_t
*
ver
)
{
ver_block_t
*
blk
=
ver
->
blocks
;
const
ver_block_t
*
blk
=
ver
->
blocks
;
dump_lvc
(
&
(
ver
->
lvc
));
...
...
@@ -891,14 +891,14 @@ static void dump_versioninfo(versioninfo_t *ver)
/*
*****************************************************************************
* Function : dump_toolbar_item
* Syntax : void dump_toolbar_item(toolbar_item_t *item)
* Syntax : void dump_toolbar_item(
const
toolbar_item_t *item)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
static
void
dump_toolbar_items
(
toolbar_item_t
*
items
)
static
void
dump_toolbar_items
(
const
toolbar_item_t
*
items
)
{
while
(
items
)
{
...
...
@@ -916,7 +916,7 @@ static void dump_toolbar_items(toolbar_item_t *items)
/*
*****************************************************************************
* Function : dump_toolbar
* Syntax : void dump_toolbar(toolbar_t *toolbar)
* Syntax : void dump_toolbar(
const
toolbar_t *toolbar)
* Input :
* toolbar - Toolbar resource descriptor
* Output :
...
...
@@ -924,7 +924,7 @@ static void dump_toolbar_items(toolbar_item_t *items)
* Remarks :
*****************************************************************************
*/
static
void
dump_toolbar
(
toolbar_t
*
toolbar
)
static
void
dump_toolbar
(
const
toolbar_t
*
toolbar
)
{
dump_memopt
(
toolbar
->
memopt
);
dump_lvc
(
&
(
toolbar
->
lvc
));
...
...
@@ -934,7 +934,7 @@ static void dump_toolbar(toolbar_t *toolbar)
/*
*****************************************************************************
* Function : dump_dlginit
* Syntax : void dump_dlginit(dlginit_t *dit)
* Syntax : void dump_dlginit(
const
dlginit_t *dit)
* Input :
* dit - DlgInit resource descriptor
* Output :
...
...
@@ -942,7 +942,7 @@ static void dump_toolbar(toolbar_t *toolbar)
* Remarks :
*****************************************************************************
*/
static
void
dump_dlginit
(
dlginit_t
*
dit
)
static
void
dump_dlginit
(
const
dlginit_t
*
dit
)
{
dump_memopt
(
dit
->
memopt
);
dump_lvc
(
&
(
dit
->
data
->
lvc
));
...
...
@@ -952,7 +952,7 @@ static void dump_dlginit(dlginit_t *dit)
/*
*****************************************************************************
* Function : dump_resources
* Syntax : void dump_resources(resource_t *top)
* Syntax : void dump_resources(
const
resource_t *top)
* Input :
* top - Top of the resource tree
* Output :
...
...
@@ -961,7 +961,7 @@ static void dump_dlginit(dlginit_t *dit)
* Remarks :
*****************************************************************************
*/
void
dump_resources
(
resource_t
*
top
)
void
dump_resources
(
const
resource_t
*
top
)
{
printf
(
"Internal resource-tree dump:
\n
"
);
while
(
top
)
...
...
tools/wrc/dumpres.h
View file @
4034ff36
...
...
@@ -23,8 +23,8 @@
#include "wrctypes.h"
c
har
*
get_typename
(
resource_t
*
r
);
void
dump_resources
(
resource_t
*
top
);
c
har
*
get_nameid_str
(
name_id_t
*
n
);
c
onst
char
*
get_typename
(
const
resource_t
*
r
);
void
dump_resources
(
const
resource_t
*
top
);
c
onst
char
*
get_nameid_str
(
const
name_id_t
*
n
);
#endif
tools/wrc/genres.c
View file @
4034ff36
...
...
@@ -1620,7 +1620,7 @@ static res_t *versioninfo2res(name_id_t *name, versioninfo_t *ver)
assert
(
ver
!=
NULL
);
vsvi
.
type
=
str_char
;
vsvi
.
str
.
cstr
=
"VS_VERSION_INFO"
;
vsvi
.
str
.
cstr
=
xstrdup
(
"VS_VERSION_INFO"
)
;
vsvi
.
size
=
15
;
/* Excl. termination */
res
=
new_res
();
...
...
@@ -1661,6 +1661,7 @@ static res_t *versioninfo2res(name_id_t *name, versioninfo_t *ver)
if
(
win32
)
put_pad
(
res
);
free
(
vsvi
.
str
.
cstr
);
return
res
;
}
...
...
@@ -1762,7 +1763,7 @@ static res_t *dlginit2res(name_id_t *name, dlginit_t *dit)
/*
*****************************************************************************
* Function : prep_nid_for_label
* Syntax : char *prep_nid_for_label(name_id_t *nid)
* Syntax : char *prep_nid_for_label(
const
name_id_t *nid)
* Input :
* Output :
* Description : Converts a resource name into the first 32 (or less)
...
...
@@ -1771,7 +1772,7 @@ static res_t *dlginit2res(name_id_t *name, dlginit_t *dit)
*****************************************************************************
*/
#define MAXNAMELEN 32
char
*
prep_nid_for_label
(
name_id_t
*
nid
)
char
*
prep_nid_for_label
(
const
name_id_t
*
nid
)
{
static
char
buf
[
MAXNAMELEN
+
1
];
...
...
@@ -1822,7 +1823,7 @@ char *prep_nid_for_label(name_id_t *nid)
/*
*****************************************************************************
* Function : make_c_name
* Syntax : char *make_c_name(c
har *base, name_id_t *nid,
language_t *lan)
* Syntax : char *make_c_name(c
onst char *base, const name_id_t *nid, const
language_t *lan)
* Input :
* Output :
* Description : Converts a resource name into a valid c-identifier in the
...
...
@@ -1830,7 +1831,7 @@ char *prep_nid_for_label(name_id_t *nid)
* Remarks :
*****************************************************************************
*/
char
*
make_c_name
(
c
har
*
base
,
name_id_t
*
nid
,
language_t
*
lan
)
char
*
make_c_name
(
c
onst
char
*
base
,
const
name_id_t
*
nid
,
const
language_t
*
lan
)
{
int
nlen
;
char
*
buf
;
...
...
@@ -1854,7 +1855,7 @@ char *make_c_name(char *base, name_id_t *nid, language_t *lan)
/*
*****************************************************************************
* Function : get_c_typename
* Syntax : char *get_c_typename(enum res_e type)
* Syntax : c
onst c
har *get_c_typename(enum res_e type)
* Input :
* Output :
* Description : Convert resource enum to char string to be used in c-name
...
...
@@ -1862,7 +1863,7 @@ char *make_c_name(char *base, name_id_t *nid, language_t *lan)
* Remarks :
*****************************************************************************
*/
char
*
get_c_typename
(
enum
res_e
type
)
c
onst
c
har
*
get_c_typename
(
enum
res_e
type
)
{
switch
(
type
)
{
...
...
tools/wrc/genres.h
View file @
4034ff36
...
...
@@ -29,8 +29,8 @@ void put_byte(res_t *res, unsigned c);
void
put_word
(
res_t
*
res
,
unsigned
w
);
void
put_dword
(
res_t
*
res
,
unsigned
d
);
void
resources2res
(
resource_t
*
top
);
char
*
get_c_typename
(
enum
res_e
type
);
char
*
make_c_name
(
c
har
*
base
,
name_id_t
*
nid
,
language_t
*
lan
);
char
*
prep_nid_for_label
(
name_id_t
*
nid
);
c
onst
c
har
*
get_c_typename
(
enum
res_e
type
);
char
*
make_c_name
(
c
onst
char
*
base
,
const
name_id_t
*
nid
,
const
language_t
*
lan
);
char
*
prep_nid_for_label
(
const
name_id_t
*
nid
);
#endif
tools/wrc/parser.l
View file @
4034ff36
...
...
@@ -157,11 +157,11 @@ static int wanted_id = 0;
static int save_wanted_id; /* To save across comment reductions */
struct keyword {
char *keyword;
int token;
int isextension;
int needcase;
int alwayskw;
c
onst c
har *keyword;
int
token;
int
isextension;
int
needcase;
int
alwayskw;
};
static struct keyword keywords[] = {
...
...
@@ -243,7 +243,7 @@ static struct keyword keywords[] = {
};
#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0]))
#define KWP(p) ((struct keyword *)(p))
#define KWP(p) ((
const
struct keyword *)(p))
static int kw_cmp_func(const void *s1, const void *s2)
{
int ret;
...
...
tools/wrc/parser.y
View file @
4034ff36
...
...
@@ -2763,7 +2763,7 @@ static resource_t *build_fontdirs(resource_t *tail)
nid.type = name_str;
nid.name.s_name = &str;
str.type = str_char;
str.str.cstr =
"FONTDIR"
;
str.str.cstr =
xstrdup("FONTDIR")
;
str.size = 7;
/* Extract all fonts and fontdirs */
...
...
@@ -2888,6 +2888,7 @@ clean:
free(fnt);
if(fnd)
free(fnd);
free(str.str.cstr);
return lst;
}
...
...
@@ -2919,7 +2920,7 @@ clean:
static int rsrcid_to_token(int lookahead)
{
int token;
char *type = "?";
c
onst c
har *type = "?";
/* Get a token if we don't have one yet */
if(lookahead == YYEMPTY)
...
...
tools/wrc/readres.c
View file @
4034ff36
...
...
@@ -100,7 +100,7 @@ int read_data(FILE *fp, size_t size, void *buf)
* Remarks :
*****************************************************************************
*/
enum
res_e
res_type_from_id
(
name_id_t
*
nid
)
enum
res_e
res_type_from_id
(
const
name_id_t
*
nid
)
{
if
(
nid
->
type
==
name_str
)
return
res_usr
;
...
...
tools/wrc/utils.c
View file @
4034ff36
...
...
@@ -204,14 +204,14 @@ char *xstrdup(const char *str)
/*
*****************************************************************************
* Function : compare_name_id
* Syntax : int compare_name_id(
name_id_t *n1,
name_id_t *n2)
* Syntax : int compare_name_id(
const name_id_t *n1, const
name_id_t *n2)
* Input :
* Output :
* Description :
* Remarks :
*****************************************************************************
*/
int
compare_name_id
(
name_id_t
*
n1
,
name_id_t
*
n2
)
int
compare_name_id
(
const
name_id_t
*
n1
,
const
name_id_t
*
n2
)
{
if
(
n1
->
type
==
name_ord
&&
n2
->
type
==
name_ord
)
{
...
...
tools/wrc/utils.h
View file @
4034ff36
...
...
@@ -41,7 +41,7 @@ void warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
void
chat
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
char
*
dup_basename
(
const
char
*
name
,
const
char
*
ext
);
int
compare_name_id
(
name_id_t
*
n1
,
name_id_t
*
n2
);
int
compare_name_id
(
const
name_id_t
*
n1
,
const
name_id_t
*
n2
);
string_t
*
convert_string
(
const
string_t
*
str
,
enum
str_e
type
,
int
codepage
);
void
free_string
(
string_t
*
str
);
int
check_unicode_conversion
(
const
string_t
*
str_a
,
const
string_t
*
str_w
,
int
codepage
);
...
...
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