diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-08-24 21:22:49 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-08-24 21:22:49 +0000 |
commit | ed1b5563c4641e53c0e59162f18a28dc0787510e (patch) | |
tree | b874b4920646d2245330a7d590106078fd7bbd02 /app | |
parent | 4ac4d273221fc7e814f4148fe824e686034d8937 (diff) |
Instead of having a function that just calls TAILQ_INIT on a global, use
TAILQ_HEAD_INITIALIZER() and drop the function.
ok okan@
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/calmwm.c | 8 | ||||
-rw-r--r-- | app/cwm/calmwm.h | 4 | ||||
-rw-r--r-- | app/cwm/client.c | 8 | ||||
-rw-r--r-- | app/cwm/screen.c | 8 |
4 files changed, 6 insertions, 22 deletions
diff --git a/app/cwm/calmwm.c b/app/cwm/calmwm.c index a656823c4..3a3a81305 100644 --- a/app/cwm/calmwm.c +++ b/app/cwm/calmwm.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.c,v 1.42 2009/06/26 12:21:58 okan Exp $ + * $Id: calmwm.c,v 1.43 2009/08/24 21:22:48 oga Exp $ */ #include "headers.h" @@ -29,10 +29,10 @@ Cursor Cursor_select; Cursor Cursor_default; Cursor Cursor_question; -struct screen_ctx_q Screenq; +struct screen_ctx_q Screenq = TAILQ_HEAD_INITIALIZER(Screenq); struct screen_ctx *Curscreen; -struct client_ctx_q Clientq; +struct client_ctx_q Clientq = TAILQ_HEAD_INITIALIZER(Clientq); int HasXinerama, HasRandr, Randr_ev; int Starting; @@ -73,9 +73,7 @@ main(int argc, char **argv) Starting = 1; dpy_init(display_name); - screen_init(); group_init(); - client_init(); bzero(&Conf, sizeof(Conf)); conf_setup(&Conf, conf_file); diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h index 87108e328..d2dbd4aca 100644 --- a/app/cwm/calmwm.h +++ b/app/cwm/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.h,v 1.94 2009/06/26 12:21:58 okan Exp $ + * $Id: calmwm.h,v 1.95 2009/08/24 21:22:48 oga Exp $ */ #ifndef _CALMWM_H_ @@ -327,7 +327,6 @@ int input_keycodetrans(KeyCode, u_int, enum ctltype *, __dead void usage(void); struct client_ctx *client_find(Window); -void client_init(void); struct client_ctx *client_new(Window, struct screen_ctx *, int); int client_delete(struct client_ctx *); void client_setactive(struct client_ctx *, int); @@ -388,7 +387,6 @@ void *xmalloc(size_t); void *xcalloc(size_t, size_t); char *xstrdup(const char *); -void screen_init(void); struct screen_ctx *screen_fromroot(Window); struct screen_ctx *screen_current(void); void screen_updatestackingorder(void); diff --git a/app/cwm/client.c b/app/cwm/client.c index 03b898a09..2814aafe7 100644 --- a/app/cwm/client.c +++ b/app/cwm/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.58 2009/08/24 17:04:39 oga Exp $ + * $Id: client.c,v 1.59 2009/08/24 21:22:48 oga Exp $ */ #include "headers.h" @@ -32,12 +32,6 @@ static int client_inbound(struct client_ctx *, int, int); static char emptystring[] = ""; struct client_ctx *_curcc = NULL; -void -client_init(void) -{ - TAILQ_INIT(&Clientq); -} - struct client_ctx * client_find(Window win) { diff --git a/app/cwm/screen.c b/app/cwm/screen.c index d1a5e1bea..55136a126 100644 --- a/app/cwm/screen.c +++ b/app/cwm/screen.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: screen.c,v 1.16 2009/06/26 12:21:58 okan Exp $ + * $Id: screen.c,v 1.17 2009/08/24 21:22:48 oga Exp $ */ #include "headers.h" @@ -23,12 +23,6 @@ extern struct screen_ctx *Curscreen; -void -screen_init(void) -{ - TAILQ_INIT(&Screenq); -} - struct screen_ctx * screen_fromroot(Window rootwin) { |