1876ff6feSmrg/* $XFree86: xc/programs/xtrap/xtrapinfo.c,v 1.1tsi Exp $ */
2876ff6feSmrg/*
3876ff6feSmrg * @DEC_COPYRIGHT@
4876ff6feSmrg */
5876ff6feSmrg/*
6876ff6feSmrg * HISTORY
7876ff6feSmrg * Log: xtrapinfo.c,v $
8876ff6feSmrg * Revision 1.1.4.2  1993/12/14  12:37:24  Kenneth_Miller
9876ff6feSmrg * 	ANSI-standardize code and turn client build on
10876ff6feSmrg * 	[1993/12/09  20:15:55  Kenneth_Miller]
11876ff6feSmrg *
12876ff6feSmrg * Revision 1.1.2.2  1992/04/27  13:51:50  Leela_Obilichetti
13876ff6feSmrg * 	initial load of xtrap clients - from silver BL6 pool
14876ff6feSmrg * 	[92/04/27  13:49:24  Leela_Obilichetti]
15876ff6feSmrg *
16876ff6feSmrg * EndLog$
17876ff6feSmrg */
18876ff6feSmrg/*****************************************************************************
19876ff6feSmrgCopyright 1987, 1988, 1989, 1990, 1991, 1992, 1993 by Digital Equipment Corp.,
20876ff6feSmrgMaynard, MA
21876ff6feSmrg
22876ff6feSmrgPermission to use, copy, modify, and distribute this software and its
23876ff6feSmrgdocumentation for any purpose and without fee is hereby granted,
24876ff6feSmrgprovided that the above copyright notice appear in all copies and that
25876ff6feSmrgboth that copyright notice and this permission notice appear in
26876ff6feSmrgsupporting documentation, and that the name of Digital not be
27876ff6feSmrgused in advertising or publicity pertaining to distribution of the
28876ff6feSmrgsoftware without specific, written prior permission.
29876ff6feSmrg
30876ff6feSmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
31876ff6feSmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
32876ff6feSmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
33876ff6feSmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
34876ff6feSmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
35876ff6feSmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
36876ff6feSmrgSOFTWARE.
37876ff6feSmrg
38876ff6feSmrg*****************************************************************************/
39876ff6feSmrg/*
40876ff6feSmrg *
41876ff6feSmrg *  CONTRIBUTORS:
42876ff6feSmrg *
43876ff6feSmrg *      Dick Annicchiarico
44876ff6feSmrg *      Robert Chesler
45876ff6feSmrg *      Dan Coutu
46876ff6feSmrg *      Gene Durso
47876ff6feSmrg *      Marc Evans
48876ff6feSmrg *      Alan Jamison
49876ff6feSmrg *      Mark Henry
50876ff6feSmrg *      Ken Miller
51876ff6feSmrg *
52876ff6feSmrg */
53876ff6feSmrg#include <stdio.h>
54876ff6feSmrg#include <stdlib.h>
55876ff6feSmrg#include <X11/extensions/xtraplib.h>
56876ff6feSmrg#include <X11/extensions/xtraplibp.h>
57876ff6feSmrg
58876ff6feSmrgint
59876ff6feSmrgmain(int argc, char *argv[])
60876ff6feSmrg{
61876ff6feSmrg    static Widget appW;
62876ff6feSmrg    XtAppContext app;
63876ff6feSmrg    char *tmp = NULL;
64876ff6feSmrg    XETrapGetAvailRep     ret_avail;
65876ff6feSmrg    XETC    *tc;
66876ff6feSmrg    Display *dpy;
67876ff6feSmrg
68876ff6feSmrg    /* Connect to Server */
69876ff6feSmrg    appW = XtAppInitialize(&app,"XTrap",NULL,(Cardinal)0L,
70876ff6feSmrg        (int *)&argc, (String *)argv, (String *)NULL, (ArgList)&tmp,
7199435119Smrg        0);
72876ff6feSmrg    dpy = XtDisplay(appW);
73876ff6feSmrg#ifdef DEBUG
74876ff6feSmrg    XSynchronize(dpy, True);
75876ff6feSmrg#endif
76876ff6feSmrg    printf("Display:  %s \n", DisplayString(dpy));
7799435119Smrg    if ((tc = XECreateTC(dpy,0L, NULL)) == NULL)
78876ff6feSmrg    {
79876ff6feSmrg        fprintf(stderr,"%s: could not initialize extension\n",argv[0]);
80876ff6feSmrg        exit(1L);
81876ff6feSmrg    }
82876ff6feSmrg
83876ff6feSmrg    (void)XEGetAvailableRequest(tc,&ret_avail);
84876ff6feSmrg    (void)XEPrintAvail(stdout,&ret_avail);
85876ff6feSmrg
86876ff6feSmrg    (void)XCloseDisplay(dpy);
87876ff6feSmrg    exit(0L);
88876ff6feSmrg}
89