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
110c8dc5
Commit
110c8dc5
authored
May 14, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a number of atom test failures.
parent
7e4af0f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
+22
-20
atom.c
dlls/ntdll/atom.c
+15
-15
atom.c
server/atom.c
+7
-5
No files found.
dlls/ntdll/atom.c
View file @
110c8dc5
...
...
@@ -54,7 +54,7 @@ static NTSTATUS is_integral_atom( LPCWSTR atomstr, size_t len, RTL_ATOM* pAtom )
if
(
HIWORD
(
atomstr
))
{
const
WCHAR
*
ptr
=
atomstr
;
if
(
!
len
)
return
STATUS_
INVALID_PARAMETER
;
if
(
!
len
)
return
STATUS_
OBJECT_NAME_INVALID
;
if
(
*
ptr
++
==
'#'
)
{
...
...
@@ -70,7 +70,7 @@ static NTSTATUS is_integral_atom( LPCWSTR atomstr, size_t len, RTL_ATOM* pAtom )
}
else
atom
=
LOWORD
(
atomstr
);
done:
if
(
atom
>=
MAXINTATOM
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
atom
||
atom
>=
MAXINTATOM
)
return
STATUS_INVALID_PARAMETER
;
*
pAtom
=
atom
;
return
STATUS_SUCCESS
;
}
...
...
@@ -140,11 +140,11 @@ NTSTATUS WINAPI RtlQueryAtomInAtomTable( RTL_ATOM_TABLE table, RTL_ATOM atom, UL
{
if
(
*
len
>
wlen
)
{
*
len
=
wlen
;
memcpy
(
name
,
full_name
,
wlen
);
name
[
wlen
/
sizeof
(
WCHAR
)]
=
0
;
}
else
status
=
STATUS_BUFFER_TOO_SMALL
;
*
len
=
wlen
;
}
TRACE
(
"%p %x -> %s (%lu)
\n
"
,
...
...
@@ -196,7 +196,7 @@ NTSTATUS WINAPI RtlAddAtomToAtomTable( RTL_ATOM_TABLE table, const WCHAR* name,
if
(
!
table
)
status
=
STATUS_INVALID_PARAMETER
;
else
{
size_t
len
=
strlenW
(
name
)
;
size_t
len
=
HIWORD
(
name
)
?
strlenW
(
name
)
:
0
;
status
=
is_integral_atom
(
name
,
len
,
atom
);
if
(
status
==
STATUS_MORE_ENTRIES
)
{
...
...
@@ -226,7 +226,7 @@ NTSTATUS WINAPI RtlLookupAtomInAtomTable( RTL_ATOM_TABLE table, const WCHAR* nam
if
(
!
table
)
status
=
STATUS_INVALID_PARAMETER
;
else
{
size_t
len
=
strlenW
(
name
)
;
size_t
len
=
HIWORD
(
name
)
?
strlenW
(
name
)
:
0
;
status
=
is_integral_atom
(
name
,
len
,
atom
);
if
(
status
==
STATUS_MORE_ENTRIES
)
{
...
...
@@ -271,19 +271,19 @@ NTSTATUS WINAPI RtlEmptyAtomTable( RTL_ATOM_TABLE table, BOOLEAN delete_pinned )
*/
NTSTATUS
WINAPI
RtlPinAtomInAtomTable
(
RTL_ATOM_TABLE
table
,
RTL_ATOM
atom
)
{
NTSTATUS
status
=
STATUS_INVALID_PARAMETER
;
NTSTATUS
status
;
if
(
!
table
)
return
STATUS_INVALID_PARAMETER
;
if
(
atom
<
MAXINTATOM
)
return
STATUS_SUCCESS
;
if
(
table
&&
atom
>=
MAXINTATOM
)
SERVER_START_REQ
(
set_atom_information
)
{
SERVER_START_REQ
(
set_atom_information
)
{
req
->
table
=
table
;
req
->
atom
=
atom
;
req
->
pinned
=
TRUE
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
req
->
table
=
table
;
req
->
atom
=
atom
;
req
->
pinned
=
TRUE
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
return
status
;
}
...
...
server/atom.c
View file @
110c8dc5
...
...
@@ -253,10 +253,12 @@ static atom_t add_atom( struct atom_table *table, const WCHAR *str, size_t len )
}
/* delete an atom from the table */
static
void
delete_atom
(
struct
atom_table
*
table
,
atom_t
atom
)
static
void
delete_atom
(
struct
atom_table
*
table
,
atom_t
atom
,
int
if_pinned
)
{
struct
atom_entry
*
entry
=
get_atom_entry
(
table
,
atom
);
if
(
entry
&&
!--
entry
->
count
)
if
(
!
entry
)
return
;
if
(
entry
->
pinned
&&
!
if_pinned
)
set_error
(
STATUS_WAS_LOCKED
);
else
if
(
!--
entry
->
count
)
{
if
(
entry
->
next
)
entry
->
next
->
prev
=
entry
->
prev
;
if
(
entry
->
prev
)
entry
->
prev
->
next
=
entry
->
next
;
...
...
@@ -328,7 +330,7 @@ int grab_global_atom( atom_t atom )
/* decrement the ref count of a global atom; used for window properties */
void
release_global_atom
(
atom_t
atom
)
{
if
(
atom
>=
MIN_STR_ATOM
)
delete_atom
(
global_table
,
atom
);
if
(
atom
>=
MIN_STR_ATOM
)
delete_atom
(
global_table
,
atom
,
1
);
}
/* add a global atom */
...
...
@@ -348,7 +350,7 @@ DECL_HANDLER(delete_atom)
struct
atom_table
*
table
=
get_table
(
req
->
table
);
if
(
table
)
{
delete_atom
(
table
,
req
->
atom
);
delete_atom
(
table
,
req
->
atom
,
0
);
release_object
(
table
);
}
}
...
...
@@ -376,7 +378,7 @@ DECL_HANDLER(get_atom_information)
{
size_t
len
=
entry
->
len
*
sizeof
(
WCHAR
);
if
(
len
<=
get_reply_max_size
())
set_reply_data
(
entry
->
str
,
len
);
else
set_error
(
STATUS_BUFFER_OVERFLOW
);
else
if
(
get_reply_max_size
())
set_error
(
STATUS_BUFFER_OVERFLOW
);
reply
->
count
=
entry
->
count
;
reply
->
pinned
=
entry
->
pinned
;
}
...
...
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