summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-06xscope 1.4.1HEADmasterAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith1-2/+3
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-03-03xscope: Fix unknown GenericEvent type decodingDaniel Stone1-1/+1
Transposed parameters meant that it was printing the sequence number rather than the type. Signed-off-by: Daniel Stone <daniels@collabora.com>
2013-11-27Print correct event names for events sent via SendEvent requestsAlan Coopersmith3-1/+24
The high bit of an X11 event id is set to 0 for events generated by the server, 1 for events sent from another client via SendEvent requests. Previously xscope printed: ..............EVENT: **INVALID** (150) Now it prints: ..............EVENT: ConfigureNotify source: SendEvent Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-11-07avoid conflicts with Solaris <sys/regset.h> #define of CSAlan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-29Bug 66388 wrong output for filter names in RandR GetCrtcTransform replyAlan Coopersmith1-9/+10
https://bugs.freedesktop.org/show_bug.cgi?id=66388 Had missed a 4 byte padding field between the transform data and the start of the filter name fields. The offset to the strings now matches the 96 bytes specified for sz_xRRGetCrtcTransformReply in <X11/extensions/randrproto.h> and the test case now reports: pending filter name: "bilinear" instead of: current filter name: "^@^@^@^@bili" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-11-19xscope 1.4Alan Coopersmith2-2/+24
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-22Add -V option to print version and exitAlan Coopersmith2-1/+10
Can't use -v, as that's already in use for verbosity level Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-19When not using xtrans, check if -lsocket & -lnsl are needed for Solaris/SVR4Alan Coopersmith1-0/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-19Don't include Xtrans files if xtrans is disabledAlan Coopersmith1-0/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-19Rename sockaddr_un variable from sun to saun to avoid conflict with #define sunAlan Coopersmith1-5/+5
Compilers auto-define "sun" on Solaris/SunOS, which causes the variable name to turn into a constant "1", breaking the parsing of the code. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-12xscope 1.3.99.901 (1.4 RC1)Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Update RANDR support from 0.x to include 1.0 - 1.4Alan Coopersmith6-29/+2074
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Refactor error printing to use common functionsAlan Coopersmith3-146/+49
All errors currently recognized by xscope fall into two forms, with or without a 32-bit value to print as a bad value, so use common implementations for those two forms so we can stop duplicating that code for every new extension-defined error. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Add experimental support for reading a previously recorded fileAlan Coopersmith2-4/+331
If you run "xscope -r -v0 > xscope.raw", then you can later run "xscope -f xscope.raw" to decode the data. Mainly adding this to aid in testing decoding of new extensions, so I don't have to re-run the commands over and over, just replay a log file. (Which may or may not have been edited to include additional request data for further testing of types & formats that clients may not make it easy to generate.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Refactor fd closing into CloseFD helper functionAlan Coopersmith3-15/+21
All versions now perform same check for XtransConn data to decide whether to use _X11TransClose or regular close, which is needed for being able to read data from pre-recorded files instead of live sockets. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2012-10-02When Verbose == 0, don't print number of data items in unknown reply typesAlan Coopersmith2-0/+5
We don't print any other data from packet when Verbose == 0, just had a few random "data: (6)" type lines sneak through. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Add -I command line flag to enter interactive mode at startupAlan Coopersmith2-2/+12
Avoids having to try to time a ^C after the signal handler is set up but before any data is handled. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Add support for printing more types of property valueAlan Coopersmith1-2/+43
Prints atoms, cardinals, integers, and windows as formatted values instead of lists of bytes. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Print UTF8_STRING properties as text if locale uses UTF-8 charsetAlan Coopersmith4-6/+42
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2012-10-02Create PrintPropertyValues function for property requestsAlan Coopersmith3-11/+26
Currently used for core protocol window properties, but will be used for extensions that have similar property handling requests in the future. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Record atoms from InternAtom and GetAtomName requestsAlan Coopersmith5-28/+157
Uses them to display strings instead of just numeric ids for atoms beyond the builtin set in other requests, such as property lookups. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Convert ValueRec structures from unsigned long to uint32_t valuesAlan Coopersmith4-19/+19
Used for GC struct members, which are defined in the protocol as 32-bit, so no need to waste time and memory copying into 64-bit longs everywhere Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Handle big-requests when calculating request contents from length fieldAlan Coopersmith3-35/+49
Adds a getreqlen inline function to handle the big requests check. As noted in the comment, it must be called *before* the printreqlen macro does its own check, since printreqlen "fixes" the buf pointer when it's done to align all the remaining fields with their correct positions after skipping over the extra big requests 32-bit length field after the normal 16-bit length field. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02ILong: shift each byte individually, then OR them togetherAlan Coopersmith1-2/+2
instead of shifting the whole word as each byte is loaded into place Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Move ILong, IShort, etal to inline functions in x11.hAlan Coopersmith3-65/+58
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Convert ILong, IShort, etal to return C99 uint*_t typesAlan Coopersmith2-8/+10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Convert remaining bcopy() calls to memcpy()Alan Coopersmith3-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2012-10-02Add _X_NORETURN to additional functions suggested by gcc warningsAlan Coopersmith2-4/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-10-02Convert remaining sprintf calls to snprintfAlan Coopersmith4-9/+11
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2012-10-02SaveBytes: drop unnecessary casts in bcopy() callAlan Coopersmith1-3/+3
Clears gcc warning from casting a const char * to char *: server.c: In function `SaveBytes': server.c:203: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2012-10-02Move debug statement before panic() call, so it can actually runAlan Coopersmith1-1/+1
Fixes compiler warning: "fd.c", line 481: warning: statement not reached Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-21Define *HEADER constants as string pointers, not arraysAlan Coopersmith2-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-21Combine usage message into single string for fprintfAlan Coopersmith1-12/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-21Use local variable for ioctl argument instead of a staticAlan Coopersmith1-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-21Convert to X.Org standard indentation & cleanup whitespaceAlan Coopersmith43-12263/+11748
Performed with util/modular/x-indent-all.sh, followed by manual fixups Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-21Convert Keith's personal license notice to X.Org standard MIT license noticeAlan Coopersmith9-157/+103
Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-20Convert sources from ISO 8859-1 to UTF-8Alan Coopersmith11-14/+14
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Retry _X11TransConnect on TRANS_TRY_CONNECT_AGAINJeff Smith1-4/+7
Reading through Xtranssock.c reveals that when _X11TransConnect returns the value TRANS_TRY_CONNECT_AGAIN, it turns off the abstract socket flag, so that attempting _X11TransConnect might succeed the second time where it failed the first time. Now xscope will attempt the connection a second time when it receives the TRANS_TRY_CONNECT_AGAIN return value on the first connection attempt. Signed-off-by: Jeff Smith <whydoubt@yahoo.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Bug 46696 - Try alternate protocol on X11 connection failure.Peter Jeremy1-13/+23
In USE_XTRANS mode, MakeConnection() cycles through a selection of protocol choices until it finds one where it can open a socket to the server. It then attempts an X11 connection via that socket and aborts if one isn't possible. This patch modifies the code to try an alternate protocol if the X11 connection fails. https://bugs.freedesktop.org/show_bug.cgi?id=46696 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Bug 46691 - xscope-1.3.1 deadlocks if client or server would blockPeter Jeremy1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=46691 Use correct write FD to select() on. FlushFD() contains logic to handle the Xclient or Xserver blocking on a write() by changing the global read and write fd_set's so that MainLoop() will select() on the blocking write FD instead of the peer read FD. Unfortunately, the code contains a logic error so that it winds up select()ing for write on the peer FD instead of the blocked FD. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Use __XFDS_BITS macros from Xpoll.h instead of direct __fds_bits accessAlan Coopersmith1-2/+7
Different platforms use different names for the fd_set members, so use the existing Xpoll.h macros for greater portability. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Bug 46689 - xscope fd_set debug output is undefinedPeter Jeremy1-4/+3
https://bugs.freedesktop.org/show_bug.cgi?id=46689 Change fd_set debug output to display actual contents of first 32 or 64 bits. In xscope-1.3.1, MainLoop() contains debug(128,...) code that appears intended to display the fd_set contents before and after the main select() call. In most implementations, fd_set will be a struct though it is printed as an int, thus the actual debug output is unlikely to usefully reflect the actual fd_set contents. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Bug 46664 - xscope prints only half the characters in 16-bit stringsPeter Jeremy1-2/+2
https://bugs.freedesktop.org/show_bug.cgi?id=46664 The length fields for PolyText16 and ImageText16 represent the number of 16-bit characters in the request but PrintString16() and PrintTString16() treat the lengths as the number of octets in the string - thus printing only half of the characters. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-11Add link to original xscope paper in READMEAlan Coopersmith1-0/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-04Include <arpa/inet.h> for inet_addr in !USE_XTRANS caseJeremy Huddleston1-0/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-21xscope 1.3.1Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-01-15Check the right return value for malloc failureAlan Coopersmith1-1/+1
Error detected by Solaris Studio 12.3 code analyzer: WARNING 1 (MRC): missing null-pointer check after malloc: calloc(((ullong)MaxFD),48) at: InitializeFD() <app/xscope/fd.c : 107> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-01-15Mark panic() as _X_NORETURNAlan Coopersmith2-3/+6
Makes the dependency on x11proto explicit - it was already needed for the X11 headers included in various files, but now needs to be at least 7.0.17 for the _X_NORETURN definition in Xfuncproto.h Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>