Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
7c80d831
Commit
7c80d831
authored
18 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to clean up.
parent
588d487e
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
src/zmapControl/remote/zmapXRemote.c
+23
-11
23 additions, 11 deletions
src/zmapControl/remote/zmapXRemote.c
src/zmapControl/remote/zmapXRemote_P.h
+20
-2
20 additions, 2 deletions
src/zmapControl/remote/zmapXRemote_P.h
with
43 additions
and
13 deletions
src/zmapControl/remote/zmapXRemote.c
+
23
−
11
View file @
7c80d831
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapXRemote.h
* HISTORY:
* Last edited:
Aug 23 18:05
200
5
(rds)
* Last edited:
May 17 11:56
200
6
(rds)
* Created: Wed Apr 13 19:04:48 2005 (rds)
* CVS info: $Id: zmapXRemote.c,v 1.1
0
200
5
-0
9-02 10:25
:1
6
rds Exp $
* CVS info: $Id: zmapXRemote.c,v 1.1
1
200
6
-0
5-17 11:18
:1
8
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -108,6 +108,8 @@ void zMapXRemoteSetRequestAtomName(zMapXRemoteObj object, char *name)
zmapXDebug
(
"zMapXRemoteSetRequestAtomName change to '%s'
\n
"
,
name
);
object
->
request_atom
=
XInternAtom
(
object
->
display
,
name
,
False
);
zmapXDebug
(
"New name is %s
\n
"
,
zmapXRemoteGetAtomName
(
object
,
object
->
request_atom
));
/* XSync(object->display, True); */
/* zmapXRemoteChangeProperty(object, object->request_atom, ""); */
return
;
}
...
...
@@ -116,6 +118,8 @@ void zMapXRemoteSetResponseAtomName(zMapXRemoteObj object, char *name)
zmapXDebug
(
"zMapXRemoteSetResponseAtomName change to '%s'
\n
"
,
name
);
object
->
response_atom
=
XInternAtom
(
object
->
display
,
name
,
False
);
zmapXDebug
(
"New name is %s
\n
"
,
zmapXRemoteGetAtomName
(
object
,
object
->
response_atom
));
/* XSync(object->display, True); */
/* zmapXRemoteChangeProperty(object, object->response_atom, ""); */
return
;
}
...
...
@@ -217,14 +221,20 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
unsigned
long
event_mask
=
(
PropertyChangeMask
|
StructureNotifyMask
);
if
(
object
->
is_server
==
TRUE
)
return
result
;
{
result
=
ZMAPXREMOTE_SENDCOMMAND_ISSERVER
;
goto
DONE
;
}
zmapXRemoteResetErrMsg
();
result
=
zmapXRemoteCheckWindow
(
object
);
if
(
result
!=
0
)
return
9
;
{
result
=
ZMAPXREMOTE_SENDCOMMAND_VERSION_MISMATCH
;
goto
DONE
;
}
zmapXDebug
(
"remote: (writing %s '%s' to 0x%x)
\n
"
,
zmapXRemoteGetAtomName
(
object
,
object
->
request_atom
),
...
...
@@ -246,12 +256,13 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
zmapXDebug
(
" - while: got event type %d
\n
"
,
event
.
type
);
if
(
windowError
){
result
=
6
;
result
=
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
;
goto
DONE
;
}
if
(
event
.
xany
.
type
==
DestroyNotify
&&
event
.
xdestroywindow
.
window
==
window
)
event
.
xdestroywindow
.
window
==
window
/* && !XPending(object->display) */
)
{
zmapXRemoteSetErrMsg
(
ZMAPXREMOTE_UNAVAILABLE
,
ZMAP_XREMOTE_META_FORMAT
...
...
@@ -262,13 +273,14 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
XDisplayString
(
dpy
),
window
,
""
,
"window was destroyed"
);
zmapXDebug
(
"remote : window 0x%x was destroyed.
\n
"
,
(
unsigned
int
)
object
->
window_id
);
result
=
6
;
/* invalid window */
result
=
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
;
/* invalid window */
goto
DONE
;
}
else
if
(
event
.
xany
.
type
==
PropertyNotify
&&
event
.
xproperty
.
state
==
PropertyNewValue
&&
event
.
xproperty
.
window
==
object
->
window_id
&&
event
.
xproperty
.
atom
==
object
->
response_atom
)
event
.
xproperty
.
atom
==
object
->
response_atom
/* && !XPending(object->display) */
)
{
Atom
actual_type
;
int
actual_format
;
...
...
@@ -309,7 +321,7 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
zmapXDebug
(
"remote: failed reading %s from window 0x%0x.
\n
"
,
zmapXRemoteGetAtomName
(
object
,
object
->
response_atom
),
(
unsigned
int
)
object
->
window_id
);
result
=
6
;
/* invalid window */
result
=
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
;
/* invalid window */
isDone
=
True
;
}
else
...
...
@@ -317,7 +329,7 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
if
(
commandResult
&&
*
commandResult
)
{
zmapXDebug
(
"cmd result| %s
\n
"
,
commandResult
);
result
=
0
;
/* everything OK */
result
=
ZMAPXREMOTE_SENDCOMMAND_SUCCEED
;
/* everything OK */
isDone
=
True
;
}
else
...
...
@@ -332,7 +344,7 @@ int zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
zmapXDebug
(
"remote: invalid data on %s property of window 0x%0x.
\n
"
,
zmapXRemoteGetAtomName
(
object
,
object
->
response_atom
),
(
unsigned
int
)
object
->
window_id
);
result
=
6
;
/* invalid window */
result
=
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
;
/* invalid window */
isDone
=
True
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/zmapControl/remote/zmapXRemote_P.h
+
20
−
2
View file @
7c80d831
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: None
* HISTORY:
* Last edited:
Aug 24 15:20
200
5
(rds)
* Last edited:
May 17 12:02
200
6
(rds)
* Created: Thu Apr 14 13:07:51 2005 (rds)
* CVS info: $Id: zmapXRemote_P.h,v 1.
6
200
5
-0
9-02 10:25
:1
7
rds Exp $
* CVS info: $Id: zmapXRemote_P.h,v 1.
7
200
6
-0
5-17 11:18
:1
8
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -44,6 +44,24 @@
#include
<ZMap/zmapXRemote.h>
/* Public header */
#include
<ZMap/zmapUtils.h>
/* really this needs to be public and be returned from
* zMapXRemoteSendRemoteCommand, but I can't handle having to cope
* with version mismatch errors at the moment.
*
* So add this typedef and this prototype to the public header and
* uncomment !XPending in zmapXRemote.c
*
* ZMapXRemoteSendCommandError zMapXRemoteSendRemoteCommand(zMapXRemoteObj object, char *command)
*/
typedef
enum
{
ZMAPXREMOTE_SENDCOMMAND_SUCCEED
=
0
,
ZMAPXREMOTE_SENDCOMMAND_ISSERVER
,
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
=
6
,
ZMAPXREMOTE_SENDCOMMAND_VERSION_MISMATCH
=
9
,
ZMAPXREMOTE_SENDCOMMAND_UNKNOWN
}
ZMapXRemoteSendCommandError
;
typedef
struct
_zMapXRemoteObjStruct
{
Display
*
display
;
/* The display XOpenDisplay() succeeded in creating this */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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