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
e035e01b
Commit
e035e01b
authored
May 19, 2005
by
Dimi Paun
Committed by
Alexandre Julliard
May 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename back local_compact to LOCAL_Compact for consistency.
Get rid of no longer used local.h.
parent
8ad6c255
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
163 deletions
+5
-163
local16.c
dlls/kernel/local16.c
+5
-5
local.h
include/local.h
+0
-158
No files found.
dlls/kernel/local16.c
View file @
e035e01b
...
...
@@ -724,9 +724,9 @@ static WORD LOCAL_GetFreeSpace(WORD ds, WORD countdiscard)
/***********************************************************************
*
local_c
ompact
*
LOCAL_C
ompact
*/
static
UINT16
local_c
ompact
(
HANDLE16
ds
,
UINT16
minfree
,
UINT16
flags
)
static
UINT16
LOCAL_C
ompact
(
HANDLE16
ds
,
UINT16
minfree
,
UINT16
flags
)
{
char
*
ptr
=
MapSL
(
MAKESEGPTR
(
ds
,
0
)
);
LOCALHEAPINFO
*
pInfo
;
...
...
@@ -843,7 +843,7 @@ static UINT16 local_compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
}
table
=
*
(
WORD
*
)
pEntry
;
}
return
local_c
ompact
(
ds
,
0xffff
,
LMEM_NODISCARD
);
return
LOCAL_C
ompact
(
ds
,
0xffff
,
LMEM_NODISCARD
);
}
...
...
@@ -929,7 +929,7 @@ notify_done:
arena
=
LOCAL_FindFreeBlock
(
ds
,
size
);
if
(
arena
==
0
)
{
/* no space: try to make some */
local_c
ompact
(
ds
,
size
,
flags
);
LOCAL_C
ompact
(
ds
,
size
,
flags
);
arena
=
LOCAL_FindFreeBlock
(
ds
,
size
);
}
if
(
arena
==
0
)
{
...
...
@@ -1595,7 +1595,7 @@ SEGPTR WINAPI LocalLock16( HLOCAL16 handle )
UINT16
WINAPI
LocalCompact16
(
UINT16
minfree
)
{
TRACE
(
"%04x
\n
"
,
minfree
);
return
local_c
ompact
(
CURRENT_DS
,
minfree
,
0
);
return
LOCAL_C
ompact
(
CURRENT_DS
,
minfree
,
0
);
}
...
...
include/local.h
deleted
100644 → 0
View file @
8ad6c255
/*
* Local heap declarations
*
* Copyright 1995 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_LOCAL_H
#define __WINE_LOCAL_H
#include <windef.h>
#include <wine/windef16.h>
#include <wine/winbase16.h>
#include <winreg.h>
#include <winternl.h>
#define CURRENT_DS (((STACK16FRAME*)MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved))->ds)
/* These function are equivalent to the Local* API functions, */
/* excepted that they need DS as the first parameter. This */
/* allows managing several heaps from the emulation library. */
static
inline
HLOCAL16
LOCAL_Alloc
(
HANDLE16
ds
,
UINT16
flags
,
WORD
size
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
HLOCAL16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalAlloc16
(
flags
,
size
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
HLOCAL16
LOCAL_ReAlloc
(
HANDLE16
ds
,
HLOCAL16
handle
,
WORD
size
,
UINT16
flags
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
HLOCAL16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalReAlloc16
(
handle
,
size
,
flags
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
HLOCAL16
LOCAL_Free
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
HLOCAL16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalFree16
(
handle
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
HLOCAL16
LOCAL_Handle
(
HANDLE16
ds
,
WORD
addr
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
HLOCAL16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalHandle16
(
addr
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
UINT16
LOCAL_Size
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
UINT16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalSize16
(
handle
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
UINT16
LOCAL_Flags
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
UINT16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalFlags16
(
handle
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
UINT16
LOCAL_HeapSize
(
HANDLE16
ds
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
UINT16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalHeapSize16
();
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
UINT16
LOCAL_CountFree
(
HANDLE16
ds
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
UINT16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalCountFree16
();
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
void
*
LOCAL_Lock
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
SEGPTR
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalLock16
(
handle
);
CURRENT_DS
=
oldDS
;
return
MapSL
(
ret
);
}
static
inline
BOOL16
LOCAL_Unlock
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
BOOL16
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalUnlock16
(
handle
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
static
inline
WORD
LOCAL_Compact
(
HANDLE16
ds
,
UINT16
minfree
)
{
HANDLE16
oldDS
=
CURRENT_DS
;
WORD
ret
;
CURRENT_DS
=
ds
;
ret
=
LocalCompact16
(
minfree
);
CURRENT_DS
=
oldDS
;
return
ret
;
}
#endif
/* __WINE_LOCAL_H */
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