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
1226595b
Commit
1226595b
authored
Dec 10, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Remove the no longer used resource C name.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
49564a92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
119 deletions
+0
-119
genres.c
tools/wrc/genres.c
+0
-115
genres.h
tools/wrc/genres.h
+0
-3
wrctypes.h
tools/wrc/wrctypes.h
+0
-1
No files found.
tools/wrc/genres.c
View file @
1226595b
...
@@ -1478,120 +1478,6 @@ static res_t *dlginit2res(name_id_t *name, dlginit_t *dit)
...
@@ -1478,120 +1478,6 @@ static res_t *dlginit2res(name_id_t *name, dlginit_t *dit)
/*
/*
*****************************************************************************
*****************************************************************************
* Function : prep_nid_for_label
* Syntax : char *prep_nid_for_label(const name_id_t *nid)
* Input :
* Output :
* Description : Converts a resource name into the first 32 (or less)
* characters of the name with conversions.
* Remarks :
*****************************************************************************
*/
#define MAXNAMELEN 32
char
*
prep_nid_for_label
(
const
name_id_t
*
nid
)
{
static
char
buf
[
MAXNAMELEN
+
1
];
switch
(
nid
->
type
)
{
case
name_str
:
if
(
nid
->
name
.
s_name
->
type
==
str_unicode
)
{
WCHAR
*
sptr
;
int
i
;
sptr
=
nid
->
name
.
s_name
->
str
.
wstr
;
buf
[
0
]
=
'\0'
;
for
(
i
=
0
;
*
sptr
&&
i
<
MAXNAMELEN
;
i
++
)
{
if
((
unsigned
)
*
sptr
<
0x80
&&
isprint
(
*
sptr
&
0xff
))
buf
[
i
]
=
*
sptr
++
;
else
warning
(
"Resourcename (str_unicode) contain unprintable characters or invalid translation, ignored
\n
"
);
}
buf
[
i
]
=
'\0'
;
}
else
{
char
*
cptr
;
int
i
;
cptr
=
nid
->
name
.
s_name
->
str
.
cstr
;
buf
[
0
]
=
'\0'
;
for
(
i
=
0
;
*
cptr
&&
i
<
MAXNAMELEN
;
i
++
)
{
if
((
unsigned
)
*
cptr
<
0x80
&&
isprint
(
*
cptr
&
0xff
))
buf
[
i
]
=
*
cptr
++
;
else
warning
(
"Resourcename (str_char) contain unprintable characters, ignored
\n
"
);
}
buf
[
i
]
=
'\0'
;
}
break
;
case
name_ord
:
sprintf
(
buf
,
"%u"
,
nid
->
name
.
i_name
);
break
;
}
return
buf
;
}
#undef MAXNAMELEN
/*
*****************************************************************************
* Function : make_c_name
* Syntax : char *make_c_name(const 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
* form "_base_nid".
* Remarks :
*****************************************************************************
*/
char
*
make_c_name
(
const
char
*
base
,
const
name_id_t
*
nid
,
const
language_t
*
lan
)
{
char
*
buf
=
prep_nid_for_label
(
nid
);
return
strmake
(
"_%s_%s_%d"
,
base
,
buf
,
lan
?
MAKELANGID
(
lan
->
id
,
lan
->
sub
)
:
0
);
}
/*
*****************************************************************************
* Function : get_c_typename
* Syntax : const char *get_c_typename(enum res_e type)
* Input :
* Output :
* Description : Convert resource enum to char string to be used in c-name
* creation.
* Remarks :
*****************************************************************************
*/
const
char
*
get_c_typename
(
enum
res_e
type
)
{
switch
(
type
)
{
case
res_acc
:
return
"Acc"
;
case
res_anicur
:
return
"AniCur"
;
case
res_aniico
:
return
"AniIco"
;
case
res_bmp
:
return
"Bmp"
;
case
res_cur
:
return
"Cur"
;
case
res_curg
:
return
"CurGrp"
;
case
res_dlg
:
return
"Dlg"
;
case
res_fnt
:
return
"Fnt"
;
case
res_fntdir
:
return
"FntDir"
;
case
res_ico
:
return
"Ico"
;
case
res_icog
:
return
"IcoGrp"
;
case
res_men
:
return
"Men"
;
case
res_rdt
:
return
"RCDat"
;
case
res_stt
:
return
"StrTab"
;
case
res_usr
:
return
"Usr"
;
case
res_msg
:
return
"MsgTab"
;
case
res_ver
:
return
"VerInf"
;
case
res_toolbar
:
return
"TlBr"
;
case
res_dlginit
:
return
"DlgInit"
;
default:
return
"Oops"
;
}
}
/*
*****************************************************************************
* Function : resources2res
* Function : resources2res
* Syntax : void resources2res(resource_t *top)
* Syntax : void resources2res(resource_t *top)
* Input :
* Input :
...
@@ -1687,7 +1573,6 @@ void resources2res(resource_t *top)
...
@@ -1687,7 +1573,6 @@ void resources2res(resource_t *top)
default:
default:
assert
(
0
);
assert
(
0
);
}
}
top
->
c_name
=
make_c_name
(
get_c_typename
(
top
->
type
),
top
->
name
,
top
->
lan
);
top
=
top
->
next
;
top
=
top
->
next
;
}
}
}
}
tools/wrc/genres.h
View file @
1226595b
...
@@ -29,8 +29,5 @@ void put_byte(res_t *res, unsigned c);
...
@@ -29,8 +29,5 @@ void put_byte(res_t *res, unsigned c);
void
put_word
(
res_t
*
res
,
unsigned
w
);
void
put_word
(
res_t
*
res
,
unsigned
w
);
void
put_dword
(
res_t
*
res
,
unsigned
d
);
void
put_dword
(
res_t
*
res
,
unsigned
d
);
void
resources2res
(
resource_t
*
top
);
void
resources2res
(
resource_t
*
top
);
const
char
*
get_c_typename
(
enum
res_e
type
);
char
*
make_c_name
(
const
char
*
base
,
const
name_id_t
*
nid
,
const
language_t
*
lan
);
char
*
prep_nid_for_label
(
const
name_id_t
*
nid
);
#endif
#endif
tools/wrc/wrctypes.h
View file @
1226595b
...
@@ -589,7 +589,6 @@ typedef struct resource {
...
@@ -589,7 +589,6 @@ typedef struct resource {
void
*
overlay
;
/* To catch all types at once... */
void
*
overlay
;
/* To catch all types at once... */
}
res
;
}
res
;
res_t
*
binres
;
/* To binary converted resource */
res_t
*
binres
;
/* To binary converted resource */
char
*
c_name
;
/* BaseName in output */
DWORD
memopt
;
DWORD
memopt
;
}
resource_t
;
}
resource_t
;
...
...
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