-void applyrules(Client *c);
-void arrange(void);
-void attach(Client *c);
-void attachstack(Client *c);
-void buttonpress(XEvent *e);
-void checkotherwm(void);
-void cleanup(void);
-void configure(Client *c);
-void configurenotify(XEvent *e);
-void configurerequest(XEvent *e);
-void destroynotify(XEvent *e);
-void detach(Client *c);
-void detachstack(Client *c);
-void drawbar(void);
-void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]);
-void drawtext(const char *text, ulong col[ColLast], Bool invert);
-void enternotify(XEvent *e);
-void eprint(const char *errstr, ...);
-void expose(XEvent *e);
-void focus(Client *c);
-void focusin(XEvent *e);
-void focusnext(const void *arg);
-void focusprev(const void *arg);
-Client *getclient(Window w);
-ulong getcolor(const char *colstr);
-long getstate(Window w);
-Bool gettextprop(Window w, Atom atom, char *text, uint size);
-void grabbuttons(Client *c, Bool focused);
-void grabkeys(void);
-void initfont(const char *fontstr);
-Bool isoccupied(uint t);
-Bool isprotodel(Client *c);
-Bool isurgent(uint t);
-void keypress(XEvent *e);
-void killclient(const void *arg);
-void manage(Window w, XWindowAttributes *wa);
-void mappingnotify(XEvent *e);
-void maprequest(XEvent *e);
-void movemouse(Client *c);
-Client *nexttiled(Client *c);
-void propertynotify(XEvent *e);
-void quit(const void *arg);
-void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
-void resizemouse(Client *c);
-void restack(void);
-void run(void);
-void scan(void);
-void setclientstate(Client *c, long state);
-void setmfact(const void *arg);
-void setup(void);
-void spawn(const void *arg);
-void tag(const void *arg);
-uint textnw(const char *text, uint len);
-void tile(void);
-void togglebar(const void *arg);
-void togglefloating(const void *arg);
-void togglelayout(const void *arg);
-void togglemax(const void *arg);
-void toggletag(const void *arg);
-void toggleview(const void *arg);
-void unmanage(Client *c);
-void unmapnotify(XEvent *e);
-void updatebar(void);
-void updategeom(void);
-void updatesizehints(Client *c);
-void updatetitle(Client *c);
-void updatewmhints(Client *c);
-void view(const void *arg);
-int xerror(Display *dpy, XErrorEvent *ee);
-int xerrordummy(Display *dpy, XErrorEvent *ee);
-int xerrorstart(Display *dpy, XErrorEvent *ee);
-void zoom(const void *arg);
+static void applyrules(Client *c);
+static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
+static void arrange(void);
+static void attach(Client *c);
+static void attachstack(Client *c);
+static void buttonpress(XEvent *e);
+static void checkotherwm(void);
+static void cleanup(void);
+static void cleanupmons(void);
+static void clearurgent(Client *c);
+static void configure(Client *c);
+static void configurenotify(XEvent *e);
+static void configurerequest(XEvent *e);
+static void destroynotify(XEvent *e);
+static void detach(Client *c);
+static void detachstack(Client *c);
+static void die(const char *errstr, ...);
+static Monitor *dirtomon(int dir);
+static void drawbar(Monitor *m);
+static void drawbars(void);
+static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
+static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
+static void enternotify(XEvent *e);
+static void expose(XEvent *e);
+static void focus(Client *c);
+static void focusin(XEvent *e);
+static void focusmon(const Arg *arg);
+static void focusstack(const Arg *arg);
+static unsigned long getcolor(const char *colstr);
+static Bool getrootptr(int *x, int *y);
+static long getstate(Window w);
+static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
+static void grabbuttons(Client *c, Bool focused);
+static void grabkeys(void);
+static void initfont(const char *fontstr);
+static Bool isprotodel(Client *c);
+static void keypress(XEvent *e);
+static void killclient(const Arg *arg);
+static void manage(Window w, XWindowAttributes *wa);
+static void mappingnotify(XEvent *e);
+static void maprequest(XEvent *e);
+static void monocle(Monitor *m);
+static void movemouse(const Arg *arg);
+static Client *nexttiled(Client *c);
+static Monitor *ptrtomon(int x, int y);
+static void propertynotify(XEvent *e);
+static void quit(const Arg *arg);
+static void resize(Client *c, int x, int y, int w, int h, Bool interact);
+static void resizemouse(const Arg *arg);
+static void restack(Monitor *m);
+static void run(void);
+static void scan(void);
+static void sendmon(Client *c, Monitor *m);
+static void setclientstate(Client *c, long state);
+static void setlayout(const Arg *arg);
+static void setmfact(const Arg *arg);
+static void setup(void);
+static void showhide(Client *c);
+static void sigchld(int signal);
+static void spawn(const Arg *arg);
+static void tag(const Arg *arg);
+static void tagmon(const Arg *arg);
+static int textnw(const char *text, unsigned int len);
+static void tile(Monitor *);
+static void togglebar(const Arg *arg);
+static void togglefloating(const Arg *arg);
+static void toggletag(const Arg *arg);
+static void toggleview(const Arg *arg);
+static void unfocus(Client *c);
+static void unmanage(Client *c);
+static void unmapnotify(XEvent *e);
+static void updategeom(void);
+static void updatebarpos(Monitor *m);
+static void updatebars(void);
+static void updatenumlockmask(void);
+static void updatesizehints(Client *c);
+static void updatestatus(void);
+static void updatetitle(Client *c);
+static void updatewmhints(Client *c);
+static void view(const Arg *arg);
+static Client *wintoclient(Window w);
+static Monitor *wintomon(Window w);
+static int xerror(Display *dpy, XErrorEvent *ee);
+static int xerrordummy(Display *dpy, XErrorEvent *ee);
+static int xerrorstart(Display *dpy, XErrorEvent *ee);
+static void zoom(const Arg *arg);