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
541ff5fb
Commit
541ff5fb
authored
Oct 15, 2001
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 15, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add INVALID_ATOM and MAXINTATOM to winbase.h.
Replace MIN_STR_ATOM with MAXINTATOM.
parent
386cf6e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
winbase.h
include/winbase.h
+2
-0
atom.c
memory/atom.c
+9
-9
No files found.
include/winbase.h
View file @
541ff5fb
...
...
@@ -409,6 +409,8 @@ typedef struct
#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
#define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
#define INVALID_ATOM ((ATOM)0)
#define MAXINTATOM 0xc000
#define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOM WINELIB_NAME_AW(MAKEINTATOM)
...
...
memory/atom.c
View file @
541ff5fb
...
...
@@ -19,6 +19,7 @@
#include <ctype.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/server.h"
...
...
@@ -33,7 +34,6 @@
DEFAULT_DEBUG_CHANNEL
(
atom
);
#define DEFAULT_ATOMTABLE_SIZE 37
#define MIN_STR_ATOM 0xc000
#define MAX_ATOM_LEN 255
#define ATOMTOHANDLE(atom) ((HANDLE16)(atom) << 2)
...
...
@@ -129,7 +129,7 @@ static BOOL ATOM_IsIntAtomA(LPCSTR atomstr,WORD *atomid)
}
if
(
*
atomstr
)
return
FALSE
;
}
if
(
!
atom
||
(
atom
>=
M
IN_STR_
ATOM
))
if
(
!
atom
||
(
atom
>=
M
AXINT
ATOM
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
atom
=
0
;
...
...
@@ -156,7 +156,7 @@ static BOOL ATOM_IsIntAtomW(LPCWSTR atomstr,WORD *atomid)
}
if
(
*
atomstr
)
return
FALSE
;
}
if
(
!
atom
||
(
atom
>=
M
IN_STR_
ATOM
))
if
(
!
atom
||
(
atom
>=
M
AXINT
ATOM
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
atom
=
0
;
...
...
@@ -218,7 +218,7 @@ WORD WINAPI InitAtomTable16( WORD entries )
*/
HANDLE16
WINAPI
GetAtomHandle16
(
ATOM
atom
)
{
if
(
atom
<
M
IN_STR_
ATOM
)
return
0
;
if
(
atom
<
M
AXINT
ATOM
)
return
0
;
return
ATOMTOHANDLE
(
atom
);
}
...
...
@@ -299,7 +299,7 @@ ATOM WINAPI DeleteAtom16( ATOM atom )
HANDLE16
entry
,
*
prevEntry
;
WORD
hash
;
if
(
atom
<
M
IN_STR_
ATOM
)
return
0
;
/* Integer atom */
if
(
atom
<
M
AXINT
ATOM
)
return
0
;
/* Integer atom */
if
(
CURRENT_DS
==
ATOM_UserDS
)
return
GlobalDeleteAtom
(
atom
);
TRACE
(
"0x%x
\n
"
,
atom
);
...
...
@@ -380,7 +380,7 @@ UINT16 WINAPI GetAtomName16( ATOM atom, LPSTR buffer, INT16 count )
TRACE
(
"%x
\n
"
,
atom
);
if
(
!
count
)
return
0
;
if
(
atom
<
M
IN_STR_
ATOM
)
if
(
atom
<
M
AXINT
ATOM
)
{
sprintf
(
text
,
"#%d"
,
atom
);
len
=
strlen
(
text
);
...
...
@@ -516,7 +516,7 @@ ATOM WINAPI AddAtomW( LPCWSTR str )
static
ATOM
ATOM_DeleteAtom
(
ATOM
atom
,
BOOL
local
)
{
TRACE
(
"(%s) %x
\n
"
,
local
?
"local"
:
"global"
,
atom
);
if
(
atom
<
M
IN_STR_
ATOM
)
atom
=
0
;
if
(
atom
<
M
AXINT
ATOM
)
atom
=
0
;
else
{
SERVER_START_REQ
(
delete_atom
)
...
...
@@ -666,7 +666,7 @@ static UINT ATOM_GetAtomNameA( ATOM atom, LPSTR buffer, INT count, BOOL local )
SetLastError
(
ERROR_MORE_DATA
);
return
0
;
}
if
(
atom
<
M
IN_STR_
ATOM
)
if
(
atom
<
M
AXINT
ATOM
)
{
char
name
[
8
];
if
(
!
atom
)
...
...
@@ -751,7 +751,7 @@ static UINT ATOM_GetAtomNameW( ATOM atom, LPWSTR buffer, INT count, BOOL local )
SetLastError
(
ERROR_MORE_DATA
);
return
0
;
}
if
(
atom
<
M
IN_STR_
ATOM
)
if
(
atom
<
M
AXINT
ATOM
)
{
char
name
[
8
];
if
(
!
atom
)
...
...
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