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
461ded42
Commit
461ded42
authored
Mar 22, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Mar 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added -dll option for winelib programs. (Note: will not print warnings
on failure currently).
parent
e49700ac
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
21 deletions
+75
-21
builtin.c
if1632/builtin.c
+24
-8
module.h
include/module.h
+2
-1
main.c
misc/main.c
+5
-0
main.c
miscemu/main.c
+2
-2
builtin32.c
relay32/builtin32.c
+42
-10
No files found.
if1632/builtin.c
View file @
461ded42
...
...
@@ -351,15 +351,20 @@ void BUILTIN_DefaultIntHandler( CONTEXT *context )
*
* Set runtime DLL usage flags
*/
BOOL
BUILTIN_ParseDLLOptions
(
c
onst
c
har
*
str
)
BOOL
BUILTIN_ParseDLLOptions
(
char
*
str
)
{
BUILTIN16_DLL
*
dll
;
c
onst
char
*
p
;
c
har
*
p
,
*
last
;
last
=
str
;
while
(
*
str
)
{
while
(
*
str
&&
isspace
(
*
str
))
str
++
;
if
(
!*
str
)
return
TRUE
;
while
(
*
str
&&
(
*
str
==
','
||
isspace
(
*
str
)))
str
++
;
if
(
!*
str
)
{
*
last
=
'\0'
;
/* cut off garbage at end at */
return
TRUE
;
}
if
((
*
str
!=
'+'
)
&&
(
*
str
!=
'-'
))
return
FALSE
;
str
++
;
if
(
!
(
p
=
strchr
(
str
,
','
)))
p
=
str
+
strlen
(
str
);
...
...
@@ -380,11 +385,22 @@ BOOL BUILTIN_ParseDLLOptions( const char *str )
break
;
}
}
if
(
!
dll
->
descr
)
if
(
!
BUILTIN32_EnableDLL
(
str
,
(
int
)(
p
-
str
),
(
str
[
-
1
]
==
'+'
)
))
return
FALSE
;
if
(
!
dll
->
descr
)
{
/* not found, but could get handled by BUILTIN32_, so move last */
last
=
p
;
str
=
p
;
while
(
*
str
&&
(
isspace
(
*
str
)
||
(
*
str
==
','
)))
str
++
;
}
else
{
/* handled. cut out the "[+-]DLL," string, so it isn't handled
* by BUILTIN32
*/
if
(
*
p
)
{
memcpy
(
last
,
p
,
strlen
(
p
)
+
1
);
str
=
last
;
}
else
{
*
last
=
'\0'
;
break
;
}
}
}
return
TRUE
;
}
...
...
include/module.h
View file @
461ded42
...
...
@@ -199,11 +199,12 @@ HGLOBAL16 NE_LoadPEResource( NE_MODULE *pModule, WORD type, LPVOID bits, DWORD s
extern
BOOL
BUILTIN_Init
(
void
);
extern
HMODULE16
BUILTIN_LoadModule
(
LPCSTR
name
,
BOOL
force
);
extern
LPCSTR
BUILTIN_GetEntryPoint16
(
WORD
cs
,
WORD
ip
,
WORD
*
pOrd
);
extern
BOOL
BUILTIN_ParseDLLOptions
(
c
onst
c
har
*
str
);
extern
BOOL
BUILTIN_ParseDLLOptions
(
char
*
str
);
extern
void
BUILTIN_PrintDLLs
(
void
);
/* relay32/builtin.c */
extern
HMODULE
BUILTIN32_LoadImage
(
LPCSTR
name
,
OFSTRUCT
*
ofs
,
BOOL
force
);
extern
BOOL
BUILTIN32_ParseDLLOptions
(
char
*
str
);
/* if1632/builtin.c */
extern
HMODULE16
(
*
fnBUILTIN_LoadModule
)(
LPCSTR
name
,
BOOL
force
);
...
...
misc/main.c
View file @
461ded42
...
...
@@ -34,6 +34,7 @@
#include "debug.h"
#include "debugdefs.h"
#include "xmalloc.h"
#include "module.h"
#include "version.h"
#include "winnls.h"
#include "console.h"
...
...
@@ -816,6 +817,10 @@ BOOL MAIN_WineInit( int *argc, char *argv[] )
#endif
/* !defined(X_DISPLAY_MISSING) */
MONITOR_Initialize
(
&
MONITOR_PrimaryMonitor
);
if
(
Options
.
dllFlags
)
BUILTIN32_ParseDLLOptions
(
Options
.
dllFlags
);
/* if (__winelib && errors ) print_error_message_like_misc_main(); */
atexit
(
called_at_exit
);
return
TRUE
;
}
...
...
miscemu/main.c
View file @
461ded42
...
...
@@ -140,8 +140,8 @@ int main( int argc, char *argv[] )
/* Handle -dll option (hack) */
if
(
Options
.
dllFlags
)
{
if
(
!
BUILTIN_ParseDLLOptions
(
Options
.
dllFlags
))
{
/* If there are options left, or if the parser had errors, report it */
if
(
!
BUILTIN_ParseDLLOptions
(
Options
.
dllFlags
)
||
Options
.
dllFlags
[
0
])
{
MSG
(
"%s: Syntax: -dll +xxx,... or -dll -xxx,...
\n
"
,
argv
[
0
]
);
BUILTIN_PrintDLLs
();
...
...
relay32/builtin32.c
View file @
461ded42
...
...
@@ -435,29 +435,61 @@ void BUILTIN32_Unimplemented( const BUILTIN32_DESCRIPTOR *descr, int ordinal )
ExitProcess
(
1
);
}
/***********************************************************************
* BUILTIN32_
EnableDLL
* BUILTIN32_
ParseDLLOptions
*
*
Enable or disable a built-in DLL.
*
Set runtime DLL usage flags
*/
int
BUILTIN32_EnableDLL
(
const
char
*
name
,
int
len
,
int
enable
)
BOOL
BUILTIN32_ParseDLLOptions
(
char
*
str
)
{
int
i
;
BUILTIN32_DLL
*
dll
;
char
*
p
,
*
last
;
for
(
i
=
0
,
dll
=
BuiltinDLLs
;
dll
->
descr
;
dll
++
)
last
=
str
;
while
(
*
str
)
{
if
(
!
lstrncmpiA
(
name
,
dll
->
descr
->
name
,
len
))
{
dll
->
used
=
enable
;
while
(
*
str
&&
(
*
str
==
','
||
isspace
(
*
str
)))
str
++
;
if
(
!*
str
)
{
*
last
=
'\0'
;
/* cut off garbage at end at */
return
TRUE
;
}
if
((
*
str
!=
'+'
)
&&
(
*
str
!=
'-'
))
return
FALSE
;
str
++
;
if
(
!
(
p
=
strchr
(
str
,
','
)))
p
=
str
+
strlen
(
str
);
while
((
p
>
str
)
&&
isspace
(
p
[
-
1
]))
p
--
;
if
(
p
==
str
)
return
FALSE
;
for
(
dll
=
BuiltinDLLs
;
dll
->
descr
;
dll
++
)
{
if
(
!
lstrncmpiA
(
dll
->
descr
->
name
,
str
,
(
int
)(
p
-
str
)
))
{
if
(
dll
->
descr
->
name
[
p
-
str
])
/* partial match - skip */
continue
;
dll
->
used
=
(
str
[
-
1
]
!=
'-'
);
break
;
}
}
return
FALSE
;
if
(
!
dll
->
descr
)
{
/* not found, but could get handled by BUILTIN_, so move last */
last
=
p
;
str
=
p
;
}
else
{
/* handled. cut out the "[+-]DLL," string, so it isn't handled
* by BUILTIN
*/
if
(
*
p
)
{
memcpy
(
last
,
p
,
strlen
(
p
)
+
1
);
str
=
last
;
}
else
{
*
last
=
'\0'
;
break
;
}
}
}
return
TRUE
;
}
/***********************************************************************
* BUILTIN32_PrintDLLs
*
...
...
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