summaryrefslogtreecommitdiff
path: root/xdpyinfo.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-10Mark num_known_extensions as a const, since the size is fixed at compile timeAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-10Convert sprintf calls to snprintfAlan Coopersmith1-3/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-10Rename i & count in inner loop to avoid shadowing same named vars in outer loopAlan Coopersmith1-6/+6
xdpyinfo.c: In function `print_dmx_info': xdpyinfo.c:1282: warning: declaration of 'count' shadows a previous local xdpyinfo.c:1231: warning: shadowed declaration is here xdpyinfo.c:1282: warning: declaration of 'i' shadows a previous local xdpyinfo.c:1232: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-21Add -version option to print version numberAlan Coopersmith1-0/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-21Combine usage messages into a single stringAlan Coopersmith1-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-21Declare 'len' as size_t to avoid unneccessary back-and-forth conversionsAlan Coopersmith1-1/+1
Fixes clang warnings: xdpyinfo.c:1463:12: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] int len = strlen(arg); ~~~ ^~~~~~~~~~~ xdpyinfo.c:1465:32: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (!strncmp("-display", arg, len)) { ~~~~~~~ ^~~ xdpyinfo.c:1468:47: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] } else if (!strncmp("-queryExtensions", arg, len)) { ~~~~~~~ ^~~ xdpyinfo.c:1470:35: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] } else if (!strncmp("-ext", arg, len)) { ~~~~~~~ ^~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-21Mark usage() as _X_NORETURNAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-11-05Include Xwindows.h on WIN32 to avoid type clashesJon TURNEY1-0/+4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2011-09-28Silence gcc complaint about being unable to check printf format stringAlan Coopersmith1-5/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-28Remove unused function hasExtensionAlan Coopersmith1-15/+0
Leftover from the Xprint code removed in commit 889264a52a6cf988 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-28Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith1-29/+31
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-28Strip trailing whitespaceAlan Coopersmith1-29/+29
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06Purge cvs tags.Jesse Adkins1-4/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
2010-10-04Use xcb for -queryExt instead of a round-trip per extensionAlan Coopersmith1-12/+44
On a system with 30 extensions listed by xdpyinfo, truss -c reports this saves quite a few system calls by batching the QueryExtension requests instead of a round-trip for each one: Xlib xcb writev 40 11 poll 80 22 recv 117 29 total (*) 464 296 (*) total includes all system calls, including many not shown since their count did not change significantly. There was one additional set of open/mmap/close etc. for loading the added libX11-xcb library. Over a tcp connection, this reduced both the number of packets, and due to tcp packet header overhead, the overall amount of data: Xlib xcb TCP packets 93 35 TCP bytes 11554 7726 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-03-27xprint: remove isPrintScreen codeGaetan Nadon1-16/+5
The if (isPrintScreen) always evaluate to false Reviewed-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-03-26xprint: remove conditional code regarding xprint featureGaetan Nadon1-140/+0
xprint has been removed from X Window System Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-10-12Use Xxf86dga.h & xf86dgaproto.h if present, to avoid warnings from old headersAlan Coopersmith1-3/+9
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-21Use xf86vmproto.h instead of xf86vmstr.h if it is installedAlan Coopersmith1-2/+7
Clears warnings when built with xf86vidmodeproto 2.2.99.1 & later Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-01Improved XF86-VidModeExtension printingAlan Coopersmith1-61/+77
- Combine common modeline printing code into single function - Don't return 0 unless extension isn't supported, since that makes xdpyinfo report the extension isn't supported. - Don't exit immediately if some information is not available, since other info may be present. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-01Bug 3438: xdpyinfo reporting wrong information on xf86vidmode extensionAlan Coopersmith1-2/+2
https://bugs.freedesktop.org/show_bug.cgi?id=3438 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-02-04Print Composite extension version for "-ext Composite"Alan Coopersmith1-0/+24
The only other information I could see to query in the Composite 0.4 protocol spec is the Composite Overlay Window XID, but the request to get that ID has the side effect of mapping the overlay window, and xdpyinfo shouldn't have side effects like that. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-01-13Ansification and compile warning fixes.Paulo Cesar Pereira de Andrade1-8/+9
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects make distcheck.
2008-06-13Don't print '(null)' when XF86VidModeGetMonitor() returns NULL fields.Matthieu Herrb1-1/+3
2008-05-21Ignore errors from xf86misc rather than crashing out.Adam Jackson1-0/+16
2008-04-30Handle XExtension{Keyboard,Pointer}, added in inputproto 1.4Julien Cristau1-0/+10
2007-03-20Clear a couple more memory leaks found by Sun Studio dbx check -leaksAlan Coopersmith1-0/+5
2007-03-20Coverity #748: IsPrintScreen: Returned without freeing storage "pscreens"Alan Coopersmith1-0/+1
2007-03-20Coverity #749: print_XF86VidMode_info: Returned without freeing storage ↵Alan Coopersmith1-0/+1
"modelines"
2007-03-20Coverity #750: print_xinput_info() returned without freeing storage "ext"Alan Coopersmith1-0/+1
2007-03-20Coverity #752: XListDepths return leaked in print_xrender_info()Alan Coopersmith1-0/+1
2007-03-20Fix line wrapping of extensions list in usage messageAlan Coopersmith1-1/+4
2007-03-19Clear sparse warning: Using plain integer as NULL pointerAlan Coopersmith1-1/+1
2007-03-19Fix typos in commentsAlan Coopersmith1-3/+3
2005-07-08Add support for modular extension autodetection (ignored in monolithicXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901XORG-6_8_99_900XORG-6_8_99_16XORG-6_8_99_15Keith Packard1-0/+48
build)
2005-04-26//bugs.freedesktop.org/show_bug.cgi?id=2705) attachment #2555sco_port_update-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10Roland Mainz1-0/+2
(https://bugs.freedesktop.org/attachment.cgi?id=2555) bug 2705 part II: Fix build to work with |#define BuildXprint NO| Patch by Kevin E. Martin <kem@freedesktop.org>.
2005-03-11xc/programs/twm/ImakefileXORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_1Roland Mainz1-14/+28
xc/programs/twm/twm.c //bugs.freedesktop.org/show_bug.cgi?id=2705) attachment #2087 (https://bugs.freedesktop.org/attachment.cgi?id=2087) Make twm ignore print screens to avoid that users accidentally warp on a non-video screen (which are not visible on any monitor) when the Xserver has both video and print screens. (This includes also a small cleanup of xdpyinfo where parts of the print screen test code comes from) Patch by Julien Lafon <julien.lafon@gmail.com> (MIT/X.org license).
2004-09-02Clean up defines for Xprint support and fix BuildServersOnly build forrel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904Kevin E Martin1-8/+8
libXaw.
2004-08-16As discussed and agreed on on the release-wranglers meeting of August 16,XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901Kristian Høgsberg1-1/+10
I'm committing the patch from bug #1060 to back out unconditional Xprint functionality. Back out Xprint changes. Revert xman to CVS of June 5, revert xlogo to CVS of May 8, revert xedit to CVS of April 25, to back out unconditional Xprint support. Fix up Xprint config logic to be like the rest of the extensions: BuildXprint is a one-stop option for disabling everything Xprint related. XprtServer controls building Xprt, BuildXprintLib controls building Xprint libs and BuildXprintClients controls building clients related to Xprint. BuiltXprint defaults to YES and the other options respects relevant settings, i.e. BuildServer and BuildServersOnly. Build Xaw regardless of BuildXprintLib setting. Only build xphelloworld, xplsprinters and xprehashprinterlist when BuildXprintClients it YES. Disable building xmore, it has always supported XawPrintShell. Make Xprint support depend on BuildXprintLib.
2004-06-30Add Distributed Multihead X (DMX) supportXORG-6_7_99_2XORG-6_7_99_1Kevin E Martin1-0/+141
2004-05-25Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=672 - RFE: xdpyinfoRoland Mainz1-14/+67
should print information about print screens
2004-05-16Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=623 -Roland Mainz1-0/+84
RFE: "xdpyinfo" should have support for XpExtension.
2004-04-23Merging XORG-CURRENT into trunkXACE-SELINUX-MERGEEgbert Eich1-1/+13
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330Kaleb Keithley1-77/+1
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley1-79/+551
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley1-0/+775