Commit c66eedaa authored by Bernhard Link's avatar Bernhard Link

switch to new xtrace with run-time protocol specification parsing

parent f6f73cda
bin_PROGRAMS = xtrace xtraceng
bin_PROGRAMS = xtrace
CFLAGS ?= -g -O2
AM_CPPFLAGS = @CPPFLAGS@ -Wall -DPKGDATADIR='"$(pkgdatadir)"'
# for authdata.c: -I/usr/X11R6/include -DNeedFunctionPrototypes
xtrace_CPPFLAGS = $(AM_CPPFLAGS) -DOLDSTYLE=1
xtrace_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c atoms.c
# authdata.c
xtrace_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c atoms.c translate.c stringlist.c
xtrace_LDFLAGS = -Wl,-z,defs
# for authdata.c add: -L/usr/X11R6/lib -lX11 -lXext
xtraceng_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c atoms.c translate.c stringlist.c
xtraceng_LDFLAGS = -Wl,-z,defs
noinst_HEADERS = xtrace.h xinput.inc xkb.inc xinerama.inc requests.inc events.inc shape.inc bigrequest.inc render.inc randr.inc mitshm.inc xf86vidmode.inc xf86bigfont.inc dpms.inc saver.inc fixes.inc damage.inc glx.inc parse.h stringlist.h translate.h
noinst_HEADERS = xtrace.h parse.h stringlist.h translate.h
dist_man_MANS = xtrace.1
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/install-sh $(srcdir)/stamp-h.in $(srcdir)/aclocal.m4 $(srcdir)/mkinstalldirs $(srcdir)/missing $(srcdir)/config.h.in $(srcdir)/depcomp
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/stamp-h.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
dist_pkgdata_DATA = all.proto bigfont.proto bigrequest.proto damage.proto dpms.proto errors.proto events.proto fixes.proto glx.proto mitshm.proto randr.proto render.proto requests.proto saver.proto shape.proto vidmode.proto xinerama.proto xinput.proto xkb.proto
EXTRA_DIST = autogen.sh config.h.in
distclean-local:
-rm -rf $(srcdir)/autom4te.cache
maintainer-clean-local:
......
/* This file is part of "xtrace"
* Copyright (C) 2005 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* This file is based on the following document:
Big Requests Extension
Version 2.0
X Consortium Standard
X Version 11, Release 6.4
Bob Scheifler
X Consortium, Inc.
Copyright (C) 1993, 1994 X Consortium
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documenta-
tion files (the ``Software''), to deal in the Software with-
out restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the fol-
lowing conditions:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PUR-
POSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSOR-
TIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Con-
sortium shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software
without prior written authorization from the X Consortium.
*/
#define EOP {0,NULL,0,NULL}
#define parameterBigReqEnable parameterEmpty
const struct parameter returnBigReqEnable[] ={
{ 8, "maximum-request-length", ft_UINT32, NULL},
EOP
};
#define rb(a) { #a , parameter ## a , return ## a ,NULL,NULL}
static const struct request extensionBIGREQUEST[] = {
rb(BigReqEnable)
};
#undef rb
#define ev(name) { #name , eparam ## name }
static const struct event eventsBIGREQUEST[] = {
};
#undef ev
static const char *errorsBIGREQUEST[] = {};
#undef EOP
......@@ -13,8 +13,6 @@ AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_INSTALL
dnl remove again once xtraceng becomes xtrace:
AM_PROG_CC_C_O
AC_CHECK_FUNCS([strndup])
AC_CHECK_FUNCS([asprintf])
......
/* This file is part of "xtrace"
* Copyright (C) 2008 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define EOV {0, NULL, -1, NULL}
#define EOC {-1, NULL}
static const struct constant c_damage_level[] = {
{0, "report raw rectangles"},
{1, "report delta rectangles"},
{2, "report bounding box"},
{3, "report non-empty"},
EOC
};
#define ft_DAMAGE_LEVEL ft_ENUM8,c_damage_level
static const struct constant c_damage_state[] = {
{0, "off"},
{1, "on"},
{2, "cycle"},
{3, "disable"},
EOC
};
#define ft_DAMAGE_STATE ft_ENUM8,c_damage_state
static const struct constant c_damage_kind[] = {
{0, "blanked"},
{1, "internal"},
{2, "external"},
EOC
};
#define ft_DAMAGE_KIND ft_ENUM8,c_damage_kind
static const struct constant c_damage_mask[] = {
{0x00000001, "notify"},
{0x00000002, "cycle"},
EOC
};
#define ft_DAMAGE_MASK ft_BITMASK32,c_damage_mask
#undef EOC
#define EOP {0,NULL,0,NULL}
#define LC(len) {len,NULL,0,NULL}
static const struct parameter parameterDamageQueryVersion[] = {
{ 4, "major version", ft_UINT32, NULL},
{ 8, "minor version", ft_UINT32, NULL},
EOP
};
static const struct parameter returnDamageQueryVersion[] = {
{ 8, "major version", ft_UINT32, NULL},
{ 12, "minor version", ft_UINT32, NULL},
EOP
};
static const struct parameter parameterDamageCreate[] = {
{ 4, "damage", ft_CARD32, NULL},
{ 8, "drawable", ft_DRAWABLE, NULL},
{ 12, "level", ft_DAMAGE_LEVEL},
EOP
};
static const struct parameter parameterDamageDestroy[] = {
{ 4, "damage", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterDamageSubtract[] = {
{ 4, "damage", ft_CARD32, NULL},
{ 8, "repair-region", ft_CARD32, NULL},
{ 12, "parts-region", ft_CARD32, NULL},
EOP
};
#undef EOV
#define ra(a) { #a , parameterDamage ## a , NULL,NULL,NULL}
#define rb(a) { #a , parameterDamage ## a , returnDamage ## a ,NULL,NULL}
static const struct request extensionDAMAGE[] = {
rb(QueryVersion),
ra(Create),
ra(Destroy),
ra(Subtract)
};
#undef ra
#undef rb
static const struct parameter eparamDAMAGENotify[] = {
{ 1, "level", ft_DAMAGE_LEVEL},
{ 4, "drawable", ft_DRAWABLE, NULL},
{ 8, "damage", ft_CARD32, NULL},
{ 12, "timestamp", ft_TIMESTAMP, NULL},
{ 16, "area", ft_RECTANGLE},
{ 24, "geometry", ft_RECTANGLE},
EOP
};
#define ev(name) { #name , eparam ## name }
static const struct event eventsDAMAGE[] = {
ev(DAMAGENotify),
};
#undef ev
static const char *errorsDAMAGE[] = { "BadDamage" };
#undef EOP
/* This file is part of "xtrace"
* Copyright (C) 2008 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define EOV {0, NULL, -1, NULL}
#define EOC {-1, NULL}
static const struct constant c_dpms_level[] = {
{0, "on"},
{1, "standby"},
{2, "suspend"},
{3, "off"},
EOC
};
#define ft_DPMS_LEVEL ft_ENUM16,c_dpms_level
#undef EOC
#define EOP {0,NULL,0,NULL}
#define LC(len) {len,NULL,0,NULL}
static const struct parameter parameterDpmsGetVersion[] = {
{ 4, "major version", ft_UINT16, NULL},
{ 6, "minor version", ft_UINT16, NULL},
EOP
};
static const struct parameter returnDpmsGetVersion[] = {
{ 8, "major version", ft_UINT16, NULL},
{ 10, "minor version", ft_UINT16, NULL},
EOP
};
#define parameterDpmsCapable parameterEmpty
static const struct parameter returnDpmsCapable[] = {
{ 8, "capable", ft_BOOL},
EOP
};
#define parameterDpmsGetTimeouts parameterEmpty
static const struct parameter returnDpmsGetTimeouts[] = {
{ 8, "standby", ft_UINT16, NULL},
{ 10, "suspend", ft_UINT16, NULL},
{ 12, "off", ft_UINT16, NULL},
EOP
};
static const struct parameter parameterDpmsSetTimeouts[] = {
{ 4, "standby", ft_UINT16, NULL},
{ 6, "suspend", ft_UINT16, NULL},
{ 8, "off", ft_UINT16, NULL},
EOP
};
#define parameterDpmsEnable parameterEmpty
#define parameterDpmsDisable parameterEmpty
static const struct parameter parameterDpmsForceLevel[] = {
{ 4, "level", ft_DPMS_LEVEL},
EOP
};
#define parameterDpmsInfo parameterEmpty
static const struct parameter returnDpmsInfo[] = {
{ 8, "power_level", ft_DPMS_LEVEL},
{ 10, "state", ft_BOOL},
EOP
};
#undef EOV
#define ra(a) { #a , parameter ## a , NULL,NULL,NULL}
#define rb(a) { #a , parameter ## a , return ## a ,NULL,NULL}
static const struct request extensionDPMS[] = {
rb(DpmsGetVersion),
rb(DpmsCapable),
rb(DpmsGetTimeouts),
ra(DpmsSetTimeouts),
ra(DpmsEnable),
ra(DpmsDisable),
ra(DpmsForceLevel),
rb(DpmsInfo),
};
#undef ra
#undef rb
static const struct event eventsDPMS[] = { };
static const char *errorsDPMS[] = { };
#undef EOP
This diff is collapsed.
/* This file is part of "xtrace"
* Copyright (C) 2008 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define EOV {0, NULL, -1, NULL}
#define EOC {-1, NULL}
static const struct constant c_fixes_mode[] = {
{0, "insert"},
{1, "delete"},
EOC
};
#define ft_FIXES_MODE ft_ENUM8,c_fixes_mode
static const struct constant c_fixes_target[] = {
{0, "nearest"},
{1, "root"},
EOC
};
#define ft_FIXES_TARGET ft_ENUM8,c_fixes_target
static const struct constant c_fixes_map[] = {
{0, "set"},
{1, "unset"},
EOC
};
#define ft_FIXES_MAP ft_ENUM8,c_fixes_map
static const struct constant c_fixes_region_kind[] = {
{0, "bounding"},
{1, "clip"},
EOC
};
#define ft_FIXES_REGION_KIND ft_ENUM8,c_fixes_region_kind
static const struct constant c_fixes_mask[] = {
{0x00000001, "owner notify"},
{0x00000002, "destroy notify"},
{0x00000004, "client close notify"},
EOC
};
#define ft_FIXES_MASK ft_BITMASK32,c_fixes_mask
static const struct constant c_fixes_subtype[] = {
{0, "set owner"},
{1, "destroy"},
{2, "client close"},
EOC
};
#define ft_FIXES_SUBTYPE ft_ENUM8,c_fixes_subtype
static const struct constant c_fixes_cursor_mask[] = {
{0x00000001, "display cursor notify"},
EOC
};
#define ft_FIXES_CURSOR_MASK ft_BITMASK32,c_fixes_cursor_mask
static const struct constant c_fixes_cursor_subtype[] = {
{0, "display cursor"},
EOC
};
#define ft_FIXES_CURSOR_SUBTYPE ft_ENUM8,c_fixes_cursor_subtype
#undef EOC
#define EOP {0,NULL,0,NULL}
#define LC(len) {len,NULL,0,NULL}
static const struct parameter parameterFixesQueryVersion[] = {
{ 4, "major version", ft_UINT32, NULL},
{ 8, "minor version", ft_UINT32, NULL},
EOP
};
static const struct parameter returnFixesQueryVersion[] = {
{ 8, "major version", ft_UINT32, NULL},
{ 12, "minor version", ft_UINT32, NULL},
EOP
};
static const struct parameter parameterFixesChangeSaveSet[] = {
{ 4, "mode", ft_FIXES_MODE},
{ 5, "target", ft_FIXES_TARGET},
{ 6, "map", ft_FIXES_MAP},
{ 8, "window", ft_WINDOW, NULL},
EOP
};
static const struct parameter parameterFixesSelectSelectionInput[] = {
{ 4, "window", ft_WINDOW, NULL},
{ 8, "selection", ft_ATOM, NULL},
{ 12, "eventMask", ft_FIXES_MASK},
EOP
};
static const struct parameter parameterFixesSelectCursorInput[] = {
{ 4, "window", ft_WINDOW, NULL},
{ 8, "eventMask", ft_FIXES_CURSOR_MASK},
EOP
};
#define parameterFixesGetCursorImage parameterEmpty
static const struct parameter returnFixesGetCursorImage[] = {
{ 8, "x", ft_INT16, NULL},
{ 10, "y", ft_INT16, NULL},
{ 12, "width", ft_UINT16, NULL},
{ 14, "height", ft_UINT16, NULL},
{ 16, "xhot", ft_UINT16, NULL},
{ 18, "yhot", ft_UINT16, NULL},
{ 20, "cursor serial", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterFixesCreateRegion[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "rectangles", ft_LISTofRECTANGLE},
EOP
};
static const struct parameter parameterFixesCreateRegionFromBitmap[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "bitmap", ft_PIXMAP, NULL},
EOP
};
static const struct parameter parameterFixesCreateRegionFromWindow[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "window", ft_WINDOW, NULL},
{ 12, "kind", ft_FIXES_REGION_KIND},
EOP
};
static const struct parameter parameterFixesCreateRegionFromGC[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "gc", ft_GCONTEXT, NULL},
EOP
};
static const struct parameter parameterFixesCreateRegionFromPicture[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "picture", ft_PICTURE, NULL},
EOP
};
static const struct parameter parameterFixesRegion[] = {
{ 4, "region", ft_CARD32, NULL},
EOP
};
#define parameterFixesDestroyRegion parameterFixesRegion
#define parameterFixesSetRegion parameterFixesCreateRegion
static const struct parameter parameterFixesCopyRegion[] = {
{ 4, "src-region", ft_CARD32, NULL},
{ 8, "dst-region", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterFixesCombineRegion[] = {
{ 4, "region1", ft_CARD32, NULL},
{ 8, "region2", ft_CARD32, NULL},
{ 12, "dst-region", ft_CARD32, NULL},
EOP
};
#define parameterFixesUnionRegion parameterFixesCombineRegion
#define parameterFixesIntersectRegion parameterFixesCombineRegion
#define parameterFixesSubtractRegion parameterFixesCombineRegion
static const struct parameter parameterFixesInvertRegion[] = {
{ 4, "src-region", ft_CARD32, NULL},
{ 8, "x", ft_INT16, NULL},
{ 10, "y", ft_INT16, NULL},
{ 12, "width", ft_UINT16, NULL},
{ 14, "height", ft_UINT16, NULL},
{ 16, "dst-region", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterFixesTranslateRegion[] = {
{ 4, "region", ft_CARD32, NULL},
{ 8, "delta-x", ft_INT16, NULL},
{ 10, "delta-y", ft_INT16, NULL},
EOP
};
#define parameterFixesRegionExtents parameterFixesCopyRegion
#define parameterFixesFetchRegion parameterFixesRegion
static const struct parameter returnFixesFetchRegion[] = {
{ 8, "x", ft_INT16, NULL},
{ 10, "y", ft_INT16, NULL},
{ 12, "width", ft_UINT16, NULL},
{ 14, "height", ft_UINT16, NULL},
EOP
};
static const struct parameter parameterFixesSetGCClipRegion[] = {
{ 4, "gc", ft_GCONTEXT, NULL},
{ 8, "region", ft_CARD32, NULL},
{ 12, "x origin", ft_INT16, NULL},
{ 14, "y origin", ft_INT16, NULL},
EOP
};
static const struct parameter parameterFixesSetWindowShapeRegion[] = {
{ 4, "window", ft_WINDOW, NULL},
{ 8, "kind", ft_FIXES_REGION_KIND},
{ 12, "x offset", ft_INT16, NULL},
{ 14, "y offset", ft_INT16, NULL},
{ 16, "region", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterFixesSetPictureClipRegion[] = {
{ 4, "picture", ft_PICTURE, NULL},
{ 8, "region", ft_CARD32, NULL},
{ 12, "x origin", ft_INT16, NULL},
{ 14, "y origin", ft_INT16, NULL},
EOP
};
static const struct parameter parameterFixesSetCursorName[] = {
{ 4, "cursor", ft_CARD32, NULL},
{ 8, "", ft_COUNT16, NULL},
{ 12, "name", ft_STRING8, NULL},
EOP
};
static const struct parameter parameterFixesGetCursorName[] = {
{ 4, "cursor", ft_CARD32, NULL},
EOP
};
static const struct parameter returnFixesGetCursorName[] = {
{ 8, "atom", ft_ATOM, NULL},
{ 12, "", ft_COUNT16, NULL},
{ 32, "name", ft_STRING8, NULL},
EOP
};
#define parameterFixesGetCursorImageAndName parameterEmpty
static const struct parameter returnFixesGetCursorImageAndName[] = {
{ 8, "x", ft_INT16, NULL},
{ 10, "y", ft_INT16, NULL},
{ 12, "width", ft_UINT16, NULL},
{ 14, "height", ft_UINT16, NULL},
{ 16, "xhot", ft_UINT16, NULL},
{ 18, "yhot", ft_UINT16, NULL},
{ 20, "cursor serial", ft_CARD32, NULL},
{ 24, "cursor name", ft_ATOM, NULL},
{ 28, "", ft_COUNT16, NULL},
{ 32, "name", ft_STRING8, NULL},
EOP
};
static const struct parameter parameterFixesChangeCursor[] = {
{ 4, "src-cursor", ft_CARD32, NULL},
{ 8, "dst-cursor", ft_CARD32, NULL},
EOP
};
static const struct parameter parameterFixesChangeCursorByName[] = {
{ 4, "src-cursor", ft_CARD32, NULL},
{ 8, "", ft_COUNT16, NULL},
{ 12, "name", ft_STRING8, NULL},
EOP
};
static const struct parameter parameterFixesExpandRegion[] = {
{ 4, "src-region", ft_CARD32, NULL},
{ 8, "dst-region", ft_CARD32, NULL},
{ 12, "left", ft_UINT16, NULL},
{ 14, "right", ft_UINT16, NULL},
{ 16, "top", ft_UINT16, NULL},
{ 18, "bottom", ft_UINT16, NULL},
EOP
};
#define parameterFixesHideCursor parameterWINDOW
#define parameterFixesShowCursor parameterWINDOW
#undef EOV
#define ra(a) { #a , parameterFixes ## a , NULL,NULL,NULL}
#define rb(a) { #a , parameterFixes ## a , returnFixes ## a ,NULL,NULL}
static const struct request extensionFIXES[] = {
rb(QueryVersion),
ra(ChangeSaveSet),
ra(SelectSelectionInput),
ra(SelectCursorInput),
rb(GetCursorImage),
ra(CreateRegion),
ra(CreateRegionFromBitmap),
ra(CreateRegionFromWindow),
ra(CreateRegionFromGC),
ra(CreateRegionFromPicture),
ra(DestroyRegion),
ra(SetRegion),
ra(CopyRegion),
ra(UnionRegion),
ra(IntersectRegion),
ra(SubtractRegion),
ra(InvertRegion),
ra(TranslateRegion),
ra(RegionExtents),
rb(FetchRegion),
ra(SetGCClipRegion),
ra(SetWindowShapeRegion),
ra(SetPictureClipRegion),
ra(SetCursorName),
rb(GetCursorName),
rb(GetCursorImageAndName),
ra(ChangeCursor),
ra(ChangeCursorByName),
ra(ExpandRegion),
ra(HideCursor),
ra(ShowCursor)
};
#undef ra
#undef rb
static const struct parameter eparamFixesSelectionNotify[] = {
{ 1, "subtype", ft_FIXES_SUBTYPE},
{ 4, "window", ft_WINDOW, NULL},
{ 8, "owner", ft_WINDOW, NULL},
{ 12, "selection", ft_ATOM, NULL},
{ 16, "timestamp", ft_TIMESTAMP, NULL},
{ 20, "selectionTimestamp", ft_TIMESTAMP, NULL},
EOP
};
static const struct parameter eparamFixesCursorNotify[] = {
{ 1, "subtype", ft_FIXES_CURSOR_SUBTYPE},
{ 4, "window", ft_WINDOW, NULL},
{ 8, "cursor serial", ft_CARD32, NULL},
{ 12, "timestamp", ft_TIMESTAMP, NULL},
{ 16, "name", ft_ATOM, NULL},
EOP
};
#define ev(name) { "XFIXES " #name , eparamFixes ## name }
static const struct event eventsFIXES[] = {
ev(SelectionNotify),
ev(CursorNotify),
};
#undef ev
static const char *errorsFIXES[] = { "BadRegion" };
#undef EOP
This diff is collapsed.
......@@ -32,10 +32,8 @@
#include <getopt.h>
#include "xtrace.h"
#ifndef OLDSTYLE
#include "stringlist.h"
#include "translate.h"
#endif
FILE *out;
......@@ -427,25 +425,19 @@ int main(int argc, char *argv[]) {
const char *msg;
int c;
const char *out_authfile=NULL, *in_authfile = NULL;
#ifndef OLDSTYLE
struct parser *parser;
#endif
#ifndef OLDSTYLE
stringlist_init();
parser = parser_init();
if( parser == NULL )
return EXIT_FAILURE;
#endif
out = stdout;
while( (c=getopt_long(argc,argv,"+I:d:D:f:F:cnWskiewm:o:b",longoptions,NULL)) != -1 ) {
switch( c ) {
#ifndef OLDSTYLE
case 'I':
add_searchpath(parser, optarg);
break;
#endif
case 'd':
out_displayname = optarg;
break;
......@@ -543,14 +535,12 @@ argv[0]);
}
}
#ifndef OLDSTYLE
add_searchpath(parser, PKGDATADIR);
translate(parser, "all.proto");
finalize_everything(parser);
if( !parser_free(parser) ) {
return EXIT_FAILURE;
}
#endif
signal(SIGPIPE,SIG_IGN);
if( out_displayname == NULL ) {
......@@ -601,8 +591,6 @@ argv[0]);
return EXIT_FAILURE;
}
}
#ifndef OLDSTYLE
stringlist_done();
#endif
return r;
}
/* This file is part of "xtrace"
* Copyright (C) 2006 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* This file is based on /usr/include/X11/extensions/shmstr.h which states:
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that