From 955b24e6872aba60a6337b21cbfe346f99706c40 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:49:23 +0000 Subject: XFree86 4.3.0.1 --- xkill.c | 70 +++++++++++++++++++++++++++++++-------------------------------- xkill.man | 7 +++++-- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/xkill.c b/xkill.c index 816f3e8..b23b99d 100644 --- a/xkill.c +++ b/xkill.c @@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/xkill/xkill.c,v 1.6 2001/12/14 20:02:06 dawes Exp $ */ /* * xkill - simple program for destroying unwanted clients @@ -37,6 +38,7 @@ from The Open Group. */ #include +#include #include #include @@ -52,11 +54,17 @@ char *ProgramName; #define SelectButtonAny (-1) #define SelectButtonFirst (-2) -XID parse_id(), get_window_id(); -int parse_button(), verify_okay_to_kill(); - -Exit (code) - int code; +static int parse_button ( char *s, int *buttonp ); +static XID parse_id ( char *s ); +static XID get_window_id ( Display *dpy, int screen, int button, char *msg ); +static int catch_window_errors ( Display *dpy, XErrorEvent *ev ); +static int kill_all_windows ( Display *dpy, int screenno, Bool top ); +static int verify_okay_to_kill ( Display *dpy, int screenno ); +static Bool wm_state_set ( Display *dpy, Window win ); +static Bool wm_running ( Display *dpy, int screenno ); + +static void +Exit(int code) { if (dpy) { XCloseDisplay (dpy); @@ -64,7 +72,8 @@ Exit (code) exit (code); } -usage () +static void +usage(void) { static char *options[] = { "where options include:", @@ -85,9 +94,8 @@ NULL}; Exit (1); } -main (argc, argv) - int argc; - char *argv[]; +int +main(int argc, char *argv[]) { int i; /* iterator, temp variable */ char *displayname = NULL; /* name of server to contact */ @@ -216,11 +224,12 @@ main (argc, argv) } Exit (0); + /*NOTREACHED*/ + return 0; } -int parse_button (s, buttonp) - register char *s; - int *buttonp; +static int +parse_button(char *s, int *buttonp) { register char *cp; @@ -250,8 +259,8 @@ int parse_button (s, buttonp) } -XID parse_id (s) - char *s; +static XID +parse_id(char *s) { XID retval = None; char *fmt = "%ld"; /* since XID is long */ @@ -264,11 +273,8 @@ XID parse_id (s) return (retval); } -XID get_window_id (dpy, screen, button, msg) - Display *dpy; - int screen; - int button; - char *msg; +static XID +get_window_id(Display *dpy, int screen, int button, char *msg) { Cursor cursor; /* cursor to use when selecting */ Window root; /* the current root */ @@ -329,17 +335,14 @@ XID get_window_id (dpy, screen, button, msg) } -int catch_window_errors (dpy, ev) - Display *dpy; - XErrorEvent *ev; +static int +catch_window_errors(Display *dpy, XErrorEvent *ev) { return 0; } -int kill_all_windows (dpy, screenno, top) - Display *dpy; - int screenno; - Bool top; +static int +kill_all_windows(Display *dpy, int screenno, Bool top) { Window root = RootWindow (dpy, screenno); Window dummywindow; @@ -377,9 +380,8 @@ int kill_all_windows (dpy, screenno, top) /* * ask the user to press in the root with each button in succession */ -int verify_okay_to_kill (dpy, screenno) - Display *dpy; - int screenno; +static int +verify_okay_to_kill(Display *dpy, int screenno) { unsigned char pointer_map[256]; int count = XGetPointerMapping (dpy, pointer_map, 256); @@ -409,9 +411,8 @@ int verify_okay_to_kill (dpy, screenno) /* Return True if the property WM_STATE is set on the window, otherwise * return False. */ -Bool wm_state_set(dpy, win) -Display *dpy; -Window win; +static Bool +wm_state_set(Display *dpy, Window win) { Atom wm_state; Atom actual_type; @@ -433,9 +434,8 @@ Window win; * otherwise, return False. */ -Bool wm_running(dpy, screenno) -Display *dpy; -int screenno; +static Bool +wm_running(Display *dpy, int screenno) { XWindowAttributes xwa; Status status; diff --git a/xkill.man b/xkill.man index 015eb7d..7c7efeb 100644 --- a/xkill.man +++ b/xkill.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 XKILL 1 "Release 6.4" "X Version 11" +.\" +.\" $XFree86: xc/programs/xkill/xkill.man,v 1.8 2001/12/14 20:02:06 dawes Exp $ +.\" +.TH XKILL 1 __xorgversion__ .SH NAME xkill - kill a client by its X resource .SH SYNOPSIS @@ -72,7 +75,7 @@ the root. Specifies a specific pointer button number or the word "any" to use when selecting windows. .SH "SEE ALSO" -X(1), xwininfo(1), XKillClient and XGetPointerMapping in the Xlib Programmers +X(__miscmansuffix__), xwininfo(1), XKillClient and XGetPointerMapping in the Xlib Programmers Manual, KillClient in the X Protocol Specification .SH AUTHOR Jim Fulton, MIT X Consortium -- cgit v1.2.3