From 3518dba2a5fb57f601b74528ddeb67f173e4024b Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Tue, 10 Oct 2017 11:11:27 -0500 Subject: Move usage() to be with run() in x.c run/usage/xinit are now all internal to x.c Signed-off-by: Devin J. Pohly --- x.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'x.c') diff --git a/x.c b/x.c index df2a88c..f660ca3 100644 --- a/x.c +++ b/x.c @@ -15,6 +15,7 @@ #include #include +static char *argv0; #include "arg.h" #define Glyph Glyph_ @@ -87,6 +88,7 @@ static void xdrawglyph(Glyph, int, int); static void xclear(int, int, int, int); static void xdrawcursor(void); static int xgeommasktogravity(int); +static void xinit(void); static int xloadfont(Font *, FcPattern *); static void xunloadfont(Font *); static void xsetenv(void); @@ -110,6 +112,9 @@ static void selcopy(Time); static void getbuttoninfo(XEvent *); static void mousereport(XEvent *); +static void run(void); +static void usage(void); + static void (*handler[LASTEvent])(XEvent *) = { [KeyPress] = kpress, [ClientMessage] = cmessage, @@ -1698,6 +1703,19 @@ run(void) } } +void +usage(void) +{ + die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid]" + " [[-e] command [args ...]]\n" + " %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid] -l line" + " [stty_args ...]\n", argv0, argv0); +} + int main(int argc, char *argv[]) { -- cgit v1.2.1