Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
622a343e
Commit
622a343e
authored
21 years ago
by
Jon Griffiths
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement __p__wpgmptr, _wpgmptr.
Avoid using static storage for pgm pointers.
parent
f554f8f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msvcrt/data.c
+19
-8
19 additions, 8 deletions
dlls/msvcrt/data.c
dlls/msvcrt/msvcrt.spec
+2
-2
2 additions, 2 deletions
dlls/msvcrt/msvcrt.spec
with
21 additions
and
10 deletions
dlls/msvcrt/data.c
+
19
−
8
View file @
622a343e
...
...
@@ -62,8 +62,8 @@ char **MSVCRT___initenv = 0;
MSVCRT_wchar_t
**
MSVCRT___winitenv
=
0
;
int
MSVCRT_timezone
;
int
MSVCRT_app_type
;
char
MSVCRT_pgm
[
MAX_PATH
];
char
*
MSVCRT__pgmptr
=
0
;
WCHAR
*
MSVCRT__wpgmptr
=
0
;
/* Get a snapshot of the current environment
* and construct the __p__environ array
...
...
@@ -155,6 +155,11 @@ unsigned int* __p__commode(void) { return &MSVCRT__commode; }
*/
char
**
__p__pgmptr
(
void
)
{
return
&
MSVCRT__pgmptr
;
}
/***********************************************************************
* __p__wpgmptr (MSVCRT.@)
*/
WCHAR
**
__p__wpgmptr
(
void
)
{
return
&
MSVCRT__wpgmptr
;
}
/***********************************************************************
* __p__fmode (MSVCRT.@)
*/
...
...
@@ -284,9 +289,13 @@ void msvcrt_init_args(void)
MSVCRT___initenv
=
msvcrt_SnapshotOfEnvironmentA
(
NULL
);
MSVCRT___winitenv
=
msvcrt_SnapshotOfEnvironmentW
(
NULL
);
MSVCRT_pgm
[
0
]
=
'\0'
;
GetModuleFileNameA
(
0
,
MSVCRT_pgm
,
sizeof
(
MSVCRT_pgm
)
/
sizeof
(
MSVCRT_pgm
[
0
]));
MSVCRT__pgmptr
=
MSVCRT_pgm
;
MSVCRT__pgmptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
);
if
(
MSVCRT__pgmptr
)
GetModuleFileNameA
(
0
,
MSVCRT__pgmptr
,
MAX_PATH
);
MSVCRT__wpgmptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
*
sizeof
(
WCHAR
));
if
(
MSVCRT__wpgmptr
)
GetModuleFileNameW
(
0
,
MSVCRT__wpgmptr
,
MAX_PATH
);
}
...
...
@@ -294,10 +303,12 @@ void msvcrt_init_args(void)
void
msvcrt_free_args
(
void
)
{
/* FIXME: more things to free */
if
(
MSVCRT___initenv
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___initenv
);
if
(
MSVCRT___winitenv
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___winitenv
);
if
(
MSVCRT__environ
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__environ
);
if
(
MSVCRT__wenviron
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__wenviron
);
if
(
MSVCRT___initenv
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___initenv
);
if
(
MSVCRT___winitenv
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___winitenv
);
if
(
MSVCRT__environ
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__environ
);
if
(
MSVCRT__wenviron
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__wenviron
);
if
(
MSVCRT__pgmptr
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__pgmptr
);
if
(
MSVCRT__wpgmptr
)
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__wpgmptr
);
}
/*********************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcrt/msvcrt.spec
+
2
−
2
View file @
622a343e
...
...
@@ -128,7 +128,7 @@
@ cdecl __p__winmajor()
@ cdecl __p__winminor()
@ cdecl __p__winver()
@
stub
__p__wpgmptr
#
()
@
cdecl
__p__wpgmptr()
@ stub __pioinfo #()
@ stub __pxcptinfoptrs #()
@ cdecl __set_app_type(long) MSVCRT___set_app_type
...
...
@@ -533,7 +533,7 @@
@ cdecl _wmktemp(wstr)
@ varargs _wopen(wstr long)
@ stub _wperror #(wstr)
@
stub
_wpgmptr
# extern
@
extern
_wpgmptr
MSVCRT__wpgmptr
@ stub _wpopen #(wstr wstr)
@ cdecl _wputenv(wstr)
@ cdecl _wremove(wstr)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment