diff options
| -rw-r--r-- | st.c | 15 | ||||
| -rw-r--r-- | st.h | 2 | ||||
| -rw-r--r-- | win.h | 2 | ||||
| -rw-r--r-- | x.c | 18 |
4 files changed, 18 insertions, 19 deletions
| @@ -28,8 +28,6 @@ | |||
| 28 | #include <X11/cursorfont.h> | 28 | #include <X11/cursorfont.h> |
| 29 | #include <X11/Xft/Xft.h> | 29 | #include <X11/Xft/Xft.h> |
| 30 | 30 | ||
| 31 | char *argv0; | ||
| 32 | |||
| 33 | #define Glyph Glyph_ | 31 | #define Glyph Glyph_ |
| 34 | #define Font Font_ | 32 | #define Font Font_ |
| 35 | 33 | ||
| @@ -2687,16 +2685,3 @@ cresize(int width, int height) | |||
| 2687 | tresize(col, row); | 2685 | tresize(col, row); |
| 2688 | xresize(col, row); | 2686 | xresize(col, row); |
| 2689 | } | 2687 | } |
| 2690 | |||
| 2691 | void | ||
| 2692 | usage(void) | ||
| 2693 | { | ||
| 2694 | die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" | ||
| 2695 | " [-n name] [-o file]\n" | ||
| 2696 | " [-T title] [-t title] [-w windowid]" | ||
| 2697 | " [[-e] command [args ...]]\n" | ||
| 2698 | " %s [-aiv] [-c class] [-f font] [-g geometry]" | ||
| 2699 | " [-n name] [-o file]\n" | ||
| 2700 | " [-T title] [-t title] [-w windowid] -l line" | ||
| 2701 | " [stty_args ...]\n", argv0, argv0); | ||
| 2702 | } | ||
| @@ -214,8 +214,6 @@ size_t utf8encode(Rune, char *); | |||
| 214 | void *xmalloc(size_t); | 214 | void *xmalloc(size_t); |
| 215 | char *xstrdup(char *); | 215 | char *xstrdup(char *); |
| 216 | 216 | ||
| 217 | void usage(void); | ||
| 218 | |||
| 219 | /* Globals */ | 217 | /* Globals */ |
| 220 | extern TermWindow win; | 218 | extern TermWindow win; |
| 221 | extern Term term; | 219 | extern Term term; |
| @@ -9,13 +9,11 @@ typedef XftGlyphFontSpec GlyphFontSpec; | |||
| 9 | 9 | ||
| 10 | void draw(void); | 10 | void draw(void); |
| 11 | void drawregion(int, int, int, int); | 11 | void drawregion(int, int, int, int); |
| 12 | void run(void); | ||
| 13 | 12 | ||
| 14 | void xbell(int); | 13 | void xbell(int); |
| 15 | void xclipcopy(void); | 14 | void xclipcopy(void); |
| 16 | void xclippaste(void); | 15 | void xclippaste(void); |
| 17 | void xhints(void); | 16 | void xhints(void); |
| 18 | void xinit(void); | ||
| 19 | void xloadcols(void); | 17 | void xloadcols(void); |
| 20 | int xsetcolorname(int, const char *); | 18 | int xsetcolorname(int, const char *); |
| 21 | void xloadfonts(char *, double); | 19 | void xloadfonts(char *, double); |
| @@ -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 | { |
