diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-10 11:11:27 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | 3518dba2a5fb57f601b74528ddeb67f173e4024b (patch) | |
tree | 680c384eecbef2d9894eef8bc6044c4b449177b1 /x.c | |
parent | 3e44ee5569a81ba6f06e1ecd19bf0ceb1e97f18d (diff) | |
download | st-3518dba2a5fb57f601b74528ddeb67f173e4024b.tar.gz st-3518dba2a5fb57f601b74528ddeb67f173e4024b.zip |
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 <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -15,6 +15,7 @@ | |||
15 | #include <X11/Xft/Xft.h> | 15 | #include <X11/Xft/Xft.h> |
16 | #include <X11/XKBlib.h> | 16 | #include <X11/XKBlib.h> |
17 | 17 | ||
18 | static char *argv0; | ||
18 | #include "arg.h" | 19 | #include "arg.h" |
19 | 20 | ||
20 | #define Glyph Glyph_ | 21 | #define Glyph Glyph_ |
@@ -87,6 +88,7 @@ static void xdrawglyph(Glyph, int, int); | |||
87 | static void xclear(int, int, int, int); | 88 | static void xclear(int, int, int, int); |
88 | static void xdrawcursor(void); | 89 | static void xdrawcursor(void); |
89 | static int xgeommasktogravity(int); | 90 | static int xgeommasktogravity(int); |
91 | static void xinit(void); | ||
90 | static int xloadfont(Font *, FcPattern *); | 92 | static int xloadfont(Font *, FcPattern *); |
91 | static void xunloadfont(Font *); | 93 | static void xunloadfont(Font *); |
92 | static void xsetenv(void); | 94 | static void xsetenv(void); |
@@ -110,6 +112,9 @@ static void selcopy(Time); | |||
110 | static void getbuttoninfo(XEvent *); | 112 | static void getbuttoninfo(XEvent *); |
111 | static void mousereport(XEvent *); | 113 | static void mousereport(XEvent *); |
112 | 114 | ||
115 | static void run(void); | ||
116 | static void usage(void); | ||
117 | |||
113 | static void (*handler[LASTEvent])(XEvent *) = { | 118 | static void (*handler[LASTEvent])(XEvent *) = { |
114 | [KeyPress] = kpress, | 119 | [KeyPress] = kpress, |
115 | [ClientMessage] = cmessage, | 120 | [ClientMessage] = cmessage, |
@@ -1698,6 +1703,19 @@ run(void) | |||
1698 | } | 1703 | } |
1699 | } | 1704 | } |
1700 | 1705 | ||
1706 | void | ||
1707 | usage(void) | ||
1708 | { | ||
1709 | die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" | ||
1710 | " [-n name] [-o file]\n" | ||
1711 | " [-T title] [-t title] [-w windowid]" | ||
1712 | " [[-e] command [args ...]]\n" | ||
1713 | " %s [-aiv] [-c class] [-f font] [-g geometry]" | ||
1714 | " [-n name] [-o file]\n" | ||
1715 | " [-T title] [-t title] [-w windowid] -l line" | ||
1716 | " [stty_args ...]\n", argv0, argv0); | ||
1717 | } | ||
1718 | |||
1701 | int | 1719 | int |
1702 | main(int argc, char *argv[]) | 1720 | main(int argc, char *argv[]) |
1703 | { | 1721 | { |