484N/A * Copyright 1989 Massachusetts Institute of Technology 484N/A * Permission to use, copy, modify, distribute, and sell this software and its 484N/A * documentation for any purpose is hereby granted without fee, provided that 919N/A * the above copyright notice appear in all copies and that both that 919N/A * copyright notice and this permission notice appear in supporting 919N/A * documentation, and that the name of M.I.T. not be used in advertising or 919N/A * publicity pertaining to distribution of the software without specific, 919N/A * written prior permission. M.I.T. makes no representations about the 919N/A * suitability of this software for any purpose. It is provided "as is" 919N/A * without express or implied warranty. 919N/A * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 919N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. 919N/A * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 919N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 919N/A * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 919N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 919N/A * Author: Jim Fulton, MIT X Consortium 484N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 484N/A * Permission is hereby granted, free of charge, to any person obtaining a 493N/A * copy of this software and associated documentation files (the "Software"), 484N/A * to deal in the Software without restriction, including without limitation 970N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 970N/A * and/or sell copies of the Software, and to permit persons to whom the 970N/A * Software is furnished to do so, subject to the following conditions: 970N/A * The above copyright notice and this permission notice (including the next 970N/A * paragraph) shall be included in all copies or substantial portions of the 970N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 484N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1351N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 484N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 911N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1351N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1351N/A * DEALINGS IN THE SOFTWARE. static const char *
help[] = {
" -display displayname X server to contact",
" -format {hex, decimal, octal} format used to print window id",
" -indent number amount to indent per level",
" -long print a long listing",
" -resources print a listing of widget resources",
fprintf (
stderr,
"usage:\n %s [-options ...] [windowid] ...\n\n",
if (*s ==
'0') s++,
fmt =
"%lo";
if (*s ==
'x' || *s ==
'X') s++,
fmt =
"%lx";
const char *
mtype =
"XlibMessage";
for (i =
1; i <
argc; i++) {
case 'd':
/* -display displayname */ case 'i':
/* -indent number */ case 'r':
/* -resources */ case 'f':
/* -format [odh] */ break;
/* out of for loop */ * if we put anything before the XFetchName then we'll have to change the