Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
40058d04
Commit
40058d04
authored
Apr 29, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msidb: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
adeb282c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
Makefile.in
programs/msidb/Makefile.in
+2
-1
main.c
programs/msidb/main.c
+9
-9
No files found.
programs/msidb/Makefile.in
View file @
40058d04
MODULE
=
msidb.exe
APPMODE
=
-mconsole
-municode
IMPORTS
=
msi shlwapi
EXTRADLLFLAGS
=
-mconsole
-municode
-mno-cygwin
C_SRCS
=
main.c
programs/msidb/main.c
View file @
40058d04
...
...
@@ -21,13 +21,13 @@
#define WIN32_LEAN_AND_MEAN
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <msi.h>
#include <msiquery.h>
#include <shlwapi.h>
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msidb
);
...
...
@@ -132,7 +132,7 @@ static int valid_state( struct msidb_state *state )
static
int
process_argument
(
struct
msidb_state
*
state
,
int
i
,
int
argc
,
WCHAR
*
argv
[]
)
{
/* msidb accepts either "-" or "/" style flags */
if
(
strlenW
(
argv
[
i
])
!=
2
||
(
argv
[
i
][
0
]
!=
'-'
&&
argv
[
i
][
0
]
!=
'/'
))
if
(
l
strlenW
(
argv
[
i
])
!=
2
||
(
argv
[
i
][
0
]
!=
'-'
&&
argv
[
i
][
0
]
!=
'/'
))
return
0
;
switch
(
argv
[
i
][
1
]
)
{
...
...
@@ -220,9 +220,9 @@ static const WCHAR *basenameW( const WCHAR *filename )
{
const
WCHAR
*
dir_end
;
dir_end
=
strrchrW
(
filename
,
'/'
);
dir_end
=
wcsrchr
(
filename
,
'/'
);
if
(
dir_end
)
return
dir_end
+
1
;
dir_end
=
strrchrW
(
filename
,
'\\'
);
dir_end
=
wcsrchr
(
filename
,
'\\'
);
if
(
dir_end
)
return
dir_end
+
1
;
return
filename
;
}
...
...
@@ -460,14 +460,14 @@ static int import_tables( struct msidb_state *state )
WCHAR
*
ext
;
/* permit specifying tables with wildcards ('Feature*') */
if
(
strstrW
(
table_name
,
wildcard
)
!=
NULL
)
if
(
wcsstr
(
table_name
,
wildcard
)
!=
NULL
)
{
WIN32_FIND_DATAW
f
;
HANDLE
handle
;
WCHAR
*
path
;
DWORD
len
;
len
=
strlenW
(
state
->
table_folder
)
+
1
+
strlenW
(
table_name
)
+
1
;
/* %s/%s\0 */
len
=
lstrlenW
(
state
->
table_folder
)
+
1
+
l
strlenW
(
table_name
)
+
1
;
/* %s/%s\0 */
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
path
==
NULL
)
return
0
;
...
...
@@ -498,7 +498,7 @@ static int import_tables( struct msidb_state *state )
if
((
ext
=
PathFindExtensionW
(
table_name
))
==
NULL
||
lstrcmpW
(
ext
,
idt_ext
)
!=
0
)
{
const
WCHAR
format
[]
=
{
'%'
,
'.'
,
'8'
,
's'
,
'.'
,
'i'
,
'd'
,
't'
,
0
};
/* truncate to 8 characters */
s
nprintfW
(
table_path
,
ARRAY_SIZE
(
table_path
),
format
,
table_name
);
s
wprintf
(
table_path
,
ARRAY_SIZE
(
table_path
),
format
,
table_name
);
table_name
=
table_path
;
}
if
(
!
import_table
(
state
,
table_name
))
...
...
@@ -515,7 +515,7 @@ static int export_table( struct msidb_state *state, const WCHAR *table_name )
WCHAR
table_path
[
MAX_PATH
];
UINT
ret
;
s
nprintfW
(
table_path
,
ARRAY_SIZE
(
table_path
),
format
,
table_name
);
s
wprintf
(
table_path
,
ARRAY_SIZE
(
table_path
),
format
,
table_name
);
ret
=
MsiDatabaseExportW
(
state
->
database_handle
,
table_name
,
state
->
table_folder
,
table_path
);
if
(
ret
!=
ERROR_SUCCESS
)
{
...
...
@@ -603,7 +603,7 @@ static int export_tables( struct msidb_state *state )
LIST_FOR_EACH_ENTRY
(
data
,
&
state
->
table_list
,
struct
msidb_listentry
,
entry
)
{
if
(
strcmpW
(
data
->
name
,
wildcard
)
==
0
)
if
(
l
strcmpW
(
data
->
name
,
wildcard
)
==
0
)
{
if
(
!
export_all_tables
(
state
))
return
0
;
/* failed, do not commit changes */
...
...
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