From e02bcc43b489ca021248d8ea001d7adb2545d5fe Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Mon, 17 Nov 2003 19:04:09 +0000 Subject: merge XFree86 4.3.0.1 to -CURRENT --- xlsclients.c | 52 +++++++++++++++++++++++++--------------------------- xlsclients.man | 7 +++++-- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/xlsclients.c b/xlsclients.c index e80ee8d..447af85 100644 --- a/xlsclients.c +++ b/xlsclients.c @@ -26,26 +26,36 @@ in this Software without prior written authorization from The Open Group. * * * Author: Jim Fulton, MIT X Consortium */ +/* $XFree86: xc/programs/xlsclients/xlsclients.c,v 1.6 2001/12/14 20:02:09 dawes Exp $ */ #include +#include #include #include #include #include #include +#include char *ProgramName; -static void usage () +static void lookat ( Display *dpy, Window root, Bool verbose, int maxcmdlen ); +static void print_client_properties ( Display *dpy, Window w, + Bool verbose, int maxcmdlen ); +static void print_text_field ( Display *dpy, char *s, XTextProperty *tp ); +static int print_quoted_word ( char *s, int maxlen ); +static void unknown ( Display *dpy, Atom actual_type, int actual_format ); + +static void +usage(void) { fprintf (stderr, "usage: %s [-display dpy] [-m len] [-[a][l]]\n", ProgramName); exit (1); } -main (argc, argv) - int argc; - char **argv; +int +main(int argc, char *argv[]) { int i; char *displayname = NULL; @@ -109,11 +119,8 @@ main (argc, argv) exit (0); } -lookat (dpy, root, verbose, maxcmdlen) - Display *dpy; - Window root; - Bool verbose; - int maxcmdlen; +static void +lookat(Display *dpy, Window root, Bool verbose, int maxcmdlen) { Window dummy, *children = NULL, client; unsigned int i, nchildren = 0; @@ -141,11 +148,8 @@ lookat (dpy, root, verbose, maxcmdlen) static char *Nil = "(nil)"; -print_client_properties (dpy, w, verbose, maxcmdlen) - Display *dpy; - Window w; - Bool verbose; - int maxcmdlen; +static void +print_client_properties(Display *dpy, Window w, Bool verbose, int maxcmdlen) { char **cliargv = NULL; int i, cliargc; @@ -223,11 +227,8 @@ print_client_properties (dpy, w, verbose, maxcmdlen) } } - -print_text_field (dpy, s, tp) - Display *dpy; - char *s; - XTextProperty *tp; +static void +print_text_field(Display *dpy, char *s, XTextProperty *tp) { if (tp->encoding == None || tp->format == 0) { printf ("''"); @@ -244,10 +245,9 @@ print_text_field (dpy, s, tp) } /* returns the number of characters printed */ -int -print_quoted_word (s, maxlen) - char *s; - int maxlen; /* max number of chars we can print */ +static int +print_quoted_word(char *s, + int maxlen) /* max number of chars we can print */ { register char *cp; Bool need_quote = False, in_quote = False; @@ -302,10 +302,8 @@ print_quoted_word (s, maxlen) return charsprinted; } -unknown (dpy, actual_type, actual_format) - Display *dpy; - Atom actual_type; - int actual_format; +static void +unknown(Display *dpy, Atom actual_type, int actual_format) { char *s; diff --git a/xlsclients.man b/xlsclients.man index af111b3..4d977e6 100644 --- a/xlsclients.man +++ b/xlsclients.man @@ -22,7 +22,10 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.TH XLSCLIENTS 1 "Release 6.4" "X Version 11" +.\" +.\" $XFree86: xc/programs/xlsclients/xlscli.man,v 1.8 2001/12/14 20:02:08 dawes Exp $ +.\" +.TH XLSCLIENTS 1 __xorgversion__ .SH NAME xlsclients - list client applications running on a display .SH SYNOPSIS @@ -57,6 +60,6 @@ print out. The default is 10000. .B DISPLAY To get the default host, display number, and screen. .SH "SEE ALSO" -X(1), xwininfo(1), xprop(1) +X(__miscmansuffix__), xwininfo(1), xprop(1) .SH AUTHOR Jim Fulton, MIT X Consortium -- cgit v1.2.3